Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
07240835
Commit
07240835
authored
Nov 27, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The MRO conflict error message depends on dictionary hash order.
Avoid depending on this in the test.
parent
a52b784a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/test/test_descr.py
Lib/test/test_descr.py
+4
-4
No files found.
Lib/test/test_descr.py
View file @
07240835
...
...
@@ -1060,7 +1060,7 @@ def mro_disagreement():
try
:
callable
(
*
args
)
except
exc
,
msg
:
if
str
(
msg
)
!=
expected
:
if
not
str
(
msg
).
startswith
(
expected
)
:
raise
TestFailed
,
"Message %r, expected %r"
%
(
str
(
msg
),
expected
)
else
:
...
...
@@ -1071,9 +1071,9 @@ def mro_disagreement():
# Test some very simple errors
raises
(
TypeError
,
"duplicate base class A"
,
type
,
"X"
,
(
A
,
A
),
{})
raises
(
TypeError
,
"MRO conflict among bases
B, A
"
,
raises
(
TypeError
,
"MRO conflict among bases "
,
type
,
"X"
,
(
A
,
B
),
{})
raises
(
TypeError
,
"MRO conflict among bases
C, B, A
"
,
raises
(
TypeError
,
"MRO conflict among bases "
,
type
,
"X"
,
(
A
,
C
,
B
),
{})
# Test a slightly more complex error
class
GridLayout
(
object
):
pass
...
...
@@ -1081,7 +1081,7 @@ def mro_disagreement():
class
VerticalGrid
(
GridLayout
):
pass
class
HVGrid
(
HorizontalGrid
,
VerticalGrid
):
pass
class
VHGrid
(
VerticalGrid
,
HorizontalGrid
):
pass
raises
(
TypeError
,
"MRO conflict among bases
VerticalGrid, HorizontalGrid
"
,
raises
(
TypeError
,
"MRO conflict among bases "
,
type
,
"ConfusedGrid"
,
(
HVGrid
,
VHGrid
),
{})
def
objects
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment