summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_int.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_int.py')
-rw-r--r--Lib/test/test_int.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
index ec57842..6e611c2 100644
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -175,6 +175,12 @@ class IntTestCases(unittest.TestCase):
self.assertEqual(int(' 0O123 ', 0), 83)
self.assertEqual(int(' 0X123 ', 0), 291)
self.assertEqual(int(' 0B100 ', 0), 4)
+ self.assertEqual(int('0', 0), 0)
+ self.assertEqual(int('+0', 0), 0)
+ self.assertEqual(int('-0', 0), 0)
+ self.assertEqual(int('00', 0), 0)
+ self.assertRaises(ValueError, int, '08', 0)
+ self.assertRaises(ValueError, int, '-012395', 0)
# without base still base 10
self.assertEqual(int('0123'), 123)