summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2019-01-17 12:14:45 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-01-17 12:14:45 (GMT)
commit89669ffe10a9db6343f6ee42239e412c8ad96bde (patch)
tree5c525e474b70d00eaf8c22fa818a5ab44d446f62 /Lib/test/test_threading.py
parent97e12996f31f6ada4173e2cd4b6807c98ba379a4 (diff)
downloadcpython-89669ffe10a9db6343f6ee42239e412c8ad96bde.zip
cpython-89669ffe10a9db6343f6ee42239e412c8ad96bde.tar.gz
cpython-89669ffe10a9db6343f6ee42239e412c8ad96bde.tar.bz2
bpo-35283: Add deprecation warning for Thread.isAlive (GH-11454)
Add a deprecated warning for the threading.Thread.isAlive() method.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r--Lib/test/test_threading.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 8160a5a..af2d6b5 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -415,7 +415,8 @@ class ThreadTests(BaseTestCase):
t.setDaemon(True)
t.getName()
t.setName("name")
- t.isAlive()
+ with self.assertWarnsRegex(DeprecationWarning, 'use is_alive()'):
+ t.isAlive()
e = threading.Event()
e.isSet()
threading.activeCount()