Skip to content

Commit

Permalink
Add missed import.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Nov 1, 2023
1 parent 37c212a commit eef4a80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/test/test_capi/test_bytes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unittest
import sys
from test.support import import_helper

_testcapi = import_helper.import_module('_testcapi')
Expand Down Expand Up @@ -54,7 +55,7 @@ def test_fromstringandsize(self):
self.assertEqual(fromstringandsize(b'', 0), b'')
self.assertEqual(fromstringandsize(NULL, 0), b'')
self.assertEqual(len(fromstringandsize(NULL, 3)), 3)
self.assertRaises(MemoryError, fromstringandsize, NULL, sys.maxsize)
self.assertRaises((MemoryError, OverflowError), fromstringandsize, NULL, sys.maxsize)

self.assertRaises(SystemError, fromstringandsize, b'abc', -1)
self.assertRaises(SystemError, fromstringandsize, NULL, -1)
Expand Down

0 comments on commit eef4a80

Please sign in to comment.