summaryrefslogtreecommitdiff
path: root/Lib/test/test_unittest.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-01-08 18:41:40 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-01-08 18:41:40 +0000
commit3ddc435af6873c6304058d7bcbcb19ee4fba7781 (patch)
treec7a03cf0a8b856bae2ebebba55b09f775845c7ca /Lib/test/test_unittest.py
parent3194d1454cbc11ec477d83fff3fc749972107d29 (diff)
downloadcpython-git-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.gz
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
Diffstat (limited to 'Lib/test/test_unittest.py')
-rw-r--r--Lib/test/test_unittest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py
index db51f77d7b..9b24c8c153 100644
--- a/Lib/test/test_unittest.py
+++ b/Lib/test/test_unittest.py
@@ -3056,7 +3056,7 @@ class Test_Assertions(TestCase):
try:
self.assertRaises(KeyError, lambda: None)
except self.failureException as e:
- self.assert_("KeyError not raised" in e, str(e))
+ self.assert_("KeyError not raised" in e.args, str(e))
else:
self.fail("assertRaises() didn't fail")
try:
@@ -3073,7 +3073,7 @@ class Test_Assertions(TestCase):
with self.assertRaises(KeyError):
pass
except self.failureException as e:
- self.assert_("KeyError not raised" in e, str(e))
+ self.assert_("KeyError not raised" in e.args, str(e))
else:
self.fail("assertRaises() didn't fail")
try:
@@ -3591,6 +3591,9 @@ class TestDiscovery(TestCase):
def __eq__(self, other):
return self.path == other.path
+ # Silence Py3k warning
+ __hash__ = None
+
loader._get_module_from_name = lambda name: Module(name)
def loadTestsFromModule(module, use_load_tests):
if use_load_tests: