GH-117195: Avoid assertion error in object.__sizeof__ (GH-117220)

This commit is contained in:
Mark Shannon 2024-05-23 11:06:10 +01:00 committed by GitHub
parent c85e352673
commit 406ffb5293
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View file

@ -1639,6 +1639,8 @@ class LongTest(unittest.TestCase):
MyInt.__basicsize__ + MyInt.__itemsize__ * ndigits
)
# GH-117195 -- This shouldn't crash
object.__sizeof__(1)
if __name__ == "__main__":
unittest.main()