summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-05-27 06:43:52 (GMT)
committerGitHub <noreply@github.com>2021-05-27 06:43:52 (GMT)
commitfbff5387c3e1f3904420fa5a27738c6c5881305b (patch)
treea4e01083dde3afdde7306e55f70c1493fdc07b0a /Lib/test/test_threading.py
parent3e7ee02327db13e4337374597cdc4458ecb9e3ad (diff)
downloadcpython-fbff5387c3e1f3904420fa5a27738c6c5881305b.zip
cpython-fbff5387c3e1f3904420fa5a27738c6c5881305b.tar.gz
cpython-fbff5387c3e1f3904420fa5a27738c6c5881305b.tar.bz2
bpo-43988: Use check disallow instantiation helper (GH-26392)
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r--Lib/test/test_threading.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index b563797..f648a8b 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -124,8 +124,7 @@ class ThreadTests(BaseTestCase):
def test_disallow_instantiation(self):
# Ensure that the type disallows instantiation (bpo-43916)
lock = threading.Lock()
- tp = type(lock)
- self.assertRaises(TypeError, tp)
+ test.support.check_disallow_instantiation(self, type(lock))
# Create a bunch of threads, let each do some work, wait until all are
# done.