diff options
| author | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 18:41:40 (GMT) |
|---|---|---|
| committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 18:41:40 (GMT) |
| commit | 3ddc435af6873c6304058d7bcbcb19ee4fba7781 (patch) | |
| tree | c7a03cf0a8b856bae2ebebba55b09f775845c7ca /Lib/test/test_fractions.py | |
| parent | 3194d1454cbc11ec477d83fff3fc749972107d29 (diff) | |
| download | cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.zip cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.gz cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.bz2 | |
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
Diffstat (limited to 'Lib/test/test_fractions.py')
| -rw-r--r-- | Lib/test/test_fractions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py index de8e539..9e3fc5e 100644 --- a/Lib/test/test_fractions.py +++ b/Lib/test/test_fractions.py @@ -43,6 +43,10 @@ class DummyFloat(object): assert False, "__sub__ should not be invoked for comparisons" __rsub__ = __sub__ + # Silence Py3k warning + def __hash__(self): + assert False, "__hash__ should not be invoked for comparisons" + class DummyRational(object): """Test comparison of Fraction with a naive rational implementation.""" @@ -76,6 +80,11 @@ class DummyRational(object): def __float__(self): assert False, "__float__ should not be invoked" + # Silence Py3k warning + def __hash__(self): + assert False, "__hash__ should not be invoked for comparisons" + + class GcdTest(unittest.TestCase): def testMisc(self): |
