From 89669ffe10a9db6343f6ee42239e412c8ad96bde Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Thu, 17 Jan 2019 21:14:45 +0900 Subject: bpo-35283: Add deprecation warning for Thread.isAlive (GH-11454) Add a deprecated warning for the threading.Thread.isAlive() method. --- Lib/test/test_threading.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/test/test_threading.py') diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 8160a5af00..af2d6b59b9 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() -- cgit v1.2.1