diff options
Diffstat (limited to 'Lib/test/test_long.py')
-rw-r--r-- | Lib/test/test_long.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 77b37ca..569ab15 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -1553,6 +1553,11 @@ class LongTest(unittest.TestCase): b = i.to_bytes(2, signed=True) self.assertIs(int.from_bytes(b, signed=True), i) + def test_is_integer(self): + self.assertTrue((-1).is_integer()) + self.assertTrue((0).is_integer()) + self.assertTrue((1).is_integer()) + def test_access_to_nonexistent_digit_0(self): # http://bugs.python.org/issue14630: A bug in _PyLong_Copy meant that # ob_digit[0] was being incorrectly accessed for instances of a |