diff options
author | Guido van Rossum <guido@python.org> | 2002-11-27 04:00:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-11-27 04:00:59 (GMT) |
commit | a01fa26396472808e9442e3a80c991f23a29a18b (patch) | |
tree | 977cba96d8ac0e4418d46bd2adc6aa4497b513d6 | |
parent | 4add68bbbc3b85d0c1e03f0cba86d999ad507375 (diff) | |
download | cpython-a01fa26396472808e9442e3a80c991f23a29a18b.zip cpython-a01fa26396472808e9442e3a80c991f23a29a18b.tar.gz cpython-a01fa26396472808e9442e3a80c991f23a29a18b.tar.bz2 |
The MRO conflict error message depends on dictionary hash order.
Avoid depending on this in the test.
-rw-r--r-- | Lib/test/test_descr.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index b230d39..f77d6a4 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -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(): |