diff options
Diffstat (limited to 'Lib/test')
-rwxr-xr-x | Lib/test/regrtest.py | 2 | ||||
-rw-r--r-- | Lib/test/test_long.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index bd79c97..790d769 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -771,8 +771,8 @@ def dash_R_cleanup(fs, ps, pic, abcs): dircache.reset() linecache.clearcache() mimetypes._default_mime_types() - struct._cache.clear() filecmp._cache.clear() + struct._clearcache() doctest.master = None # Collect cyclic trash. diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 8be8bff..223ef7c 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -537,6 +537,10 @@ class LongTest(unittest.TestCase): # conversion to string should fail self.assertRaises(ValueError, format, 3, "s") + def test_nan_inf(self): + self.assertRaises(OverflowError, long, float('inf')) + self.assertEqual(long(float('nan')), 0L) + def test_main(): test_support.run_unittest(LongTest) |