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:
Peter Bierma 2025-03-05 03:58:39 -05:00 committed by GitHub
parent e53d105872
commit 90130807d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View file

@ -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()