diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-05-26 14:15:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 14:15:27 (GMT) |
commit | 4f725261c6cf23d259e8fdc205e12b76ef4d2d31 (patch) | |
tree | 4e8e33e74cce4a7b6ef57d5e97fde49af6a4fbb4 /Lib/test/test_array.py | |
parent | 46db39d7bd67fb9fea133cd4f18cdf7eacb0f6d9 (diff) | |
download | cpython-4f725261c6cf23d259e8fdc205e12b76ef4d2d31.zip cpython-4f725261c6cf23d259e8fdc205e12b76ef4d2d31.tar.gz cpython-4f725261c6cf23d259e8fdc205e12b76ef4d2d31.tar.bz2 |
bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757)
Diffstat (limited to 'Lib/test/test_array.py')
-rw-r--r-- | Lib/test/test_array.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index b18467f..e7cddf2 100644 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -42,9 +42,9 @@ class MiscTest(unittest.TestCase): @support.cpython_only def test_disallow_instantiation(self): - # Ensure that the type disallows instantiation (bpo-43916) - tp = type(iter(array.array('I'))) - self.assertRaises(TypeError, tp) + my_array = array.array("I") + tp = type(iter(my_array)) + support.check_disallow_instantiation(self, tp, my_array) @support.cpython_only def test_immutable(self): |