diff options
-rw-r--r-- | Lib/test/test_builtin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index dd718bf..3956214 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -964,6 +964,12 @@ class BuiltinTest(unittest.TestCase): # (smaller floats still accepted, but deprecated) self.assertRaises(TypeError, range, 1e100, 1e101, 1e101) + self.assertRaises(TypeError, range, 0, "spam") + self.assertRaises(TypeError, range, 0, 42, "spam") + + self.assertRaises(OverflowError, range, -sys.maxint, sys.maxint) + self.assertRaises(OverflowError, range, 0, 2*sys.maxint) + def test_input_and_raw_input(self): self.write_testfile() fp = open(TESTFN, 'r') |