diff options
| author | Hai Shi <shihai1992@gmail.com> | 2020-07-06 09:15:08 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 09:15:08 (GMT) |
| commit | a089d21df1ea502b995d8e8a3bcc937cce030802 (patch) | |
| tree | 0ca48d704e4b63bd7090483a24879a09e1f911eb /Lib/test/test_picklebuffer.py | |
| parent | 883bc638335a57a6e6a6344c2fc132c4f9a0ec42 (diff) | |
| download | cpython-a089d21df1ea502b995d8e8a3bcc937cce030802.zip cpython-a089d21df1ea502b995d8e8a3bcc937cce030802.tar.gz cpython-a089d21df1ea502b995d8e8a3bcc937cce030802.tar.bz2 | |
bpo-40275: Use new test.support helper submodules in tests (GH-21315)
Diffstat (limited to 'Lib/test/test_picklebuffer.py')
| -rw-r--r-- | Lib/test/test_picklebuffer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_picklebuffer.py b/Lib/test/test_picklebuffer.py index 97981c8..435b3e0 100644 --- a/Lib/test/test_picklebuffer.py +++ b/Lib/test/test_picklebuffer.py @@ -8,7 +8,7 @@ from pickle import PickleBuffer import weakref import unittest -from test import support +from test.support import import_helper class B(bytes): @@ -75,7 +75,7 @@ class PickleBufferTest(unittest.TestCase): def test_ndarray_2d(self): # C-contiguous - ndarray = support.import_module("_testbuffer").ndarray + ndarray = import_helper.import_module("_testbuffer").ndarray arr = ndarray(list(range(12)), shape=(4, 3), format='<i') self.assertTrue(arr.c_contiguous) self.assertFalse(arr.f_contiguous) @@ -109,7 +109,7 @@ class PickleBufferTest(unittest.TestCase): def test_raw_ndarray(self): # 1-D, contiguous - ndarray = support.import_module("_testbuffer").ndarray + ndarray = import_helper.import_module("_testbuffer").ndarray arr = ndarray(list(range(3)), shape=(3,), format='<h') equiv = b"\x00\x00\x01\x00\x02\x00" self.check_raw(arr, equiv) @@ -135,7 +135,7 @@ class PickleBufferTest(unittest.TestCase): def test_raw_non_contiguous(self): # 1-D - ndarray = support.import_module("_testbuffer").ndarray + ndarray = import_helper.import_module("_testbuffer").ndarray arr = ndarray(list(range(6)), shape=(6,), format='<i')[::2] self.check_raw_non_contiguous(arr) # 2-D |
