From 7188e0486a60d77e3b8cb63b405ba7b882aad491 Mon Sep 17 00:00:00 2001 From: Jiwoo Ahn Date: Sat, 25 Mar 2023 12:48:34 +0900 Subject: [PATCH] Update test_array.py from Cpython v3.11.2 --- Lib/test/test_array.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 0b6a867e38..c3250ef72e 100644 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -5,6 +5,7 @@ import collections.abc import unittest from test import support +from test.support import import_helper from test.support import os_helper from test.support import _2G import weakref @@ -1151,9 +1152,9 @@ def test_initialize_with_unicode(self): @support.cpython_only def test_obsolete_write_lock(self): - from _testcapi import getbuffer_with_null_view + _testcapi = import_helper.import_module('_testcapi') a = array.array('B', b"") - self.assertRaises(BufferError, getbuffer_with_null_view, a) + self.assertRaises(BufferError, _testcapi.getbuffer_with_null_view, a) # TODO: RUSTPYTHON @unittest.expectedFailure