mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
gh-130824: Add tests for NULL
in PyLong_*AndOverflow
functions (GH-130828)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
This commit is contained in:
parent
e53d105872
commit
90130807d9
2 changed files with 6 additions and 5 deletions
|
@ -211,9 +211,8 @@ class LongTests(unittest.TestCase):
|
|||
|
||||
self.assertEqual(func(min_val - 1), (-1, -1))
|
||||
self.assertEqual(func(max_val + 1), (-1, +1))
|
||||
|
||||
# CRASHES func(1.0)
|
||||
# CRASHES func(NULL)
|
||||
self.assertRaises(SystemError, func, None)
|
||||
self.assertRaises(TypeError, func, 1.0)
|
||||
|
||||
def test_long_asint(self):
|
||||
# Test PyLong_AsInt()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue