summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r--Lib/test/test_bytes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index c2fe2cc..fd8e1d4 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -1650,8 +1650,8 @@ class ByteArrayTest(BaseBytesTest, unittest.TestCase):
@test.support.cpython_only
def test_obsolete_write_lock(self):
- from _testcapi import getbuffer_with_null_view
- self.assertRaises(BufferError, getbuffer_with_null_view, bytearray())
+ _testcapi = import_helper.import_module('_testcapi')
+ self.assertRaises(BufferError, _testcapi.getbuffer_with_null_view, bytearray())
def test_iterator_pickling2(self):
orig = bytearray(b'abc')