diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_dummy_threading.py | 6 | ||||
-rw-r--r-- | Lib/test/test_multiprocessing.py | 4 | ||||
-rw-r--r-- | Lib/test/test_socketserver.py | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_dummy_threading.py b/Lib/test/test_dummy_threading.py index 86b3f35..6ec5da3 100644 --- a/Lib/test/test_dummy_threading.py +++ b/Lib/test/test_dummy_threading.py @@ -16,7 +16,7 @@ class DummyThreadingTestCase(unittest.TestCase): #delay = random.random() * 2 delay = 0 if support.verbose: - print('task', self.get_name(), 'will run for', delay, 'sec') + print('task', self.name, 'will run for', delay, 'sec') sema.acquire() mutex.acquire() running += 1 @@ -25,11 +25,11 @@ class DummyThreadingTestCase(unittest.TestCase): mutex.release() time.sleep(delay) if support.verbose: - print('task', self.get_name(), 'done') + print('task', self.name, 'done') mutex.acquire() running -= 1 if support.verbose: - print(self.get_name(), 'is finished.', running, 'tasks are running') + print(self.name, 'is finished.', running, 'tasks are running') mutex.release() sema.release() diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 078d7fa..5c1064a 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -671,7 +671,7 @@ class _TestCondition(BaseTestCase): t = threading.Thread(target=self.f, args=(cond, sleeping, woken, TIMEOUT1)) - t.set_daemon(True) + t.daemon = True t.start() # wait for them all to sleep @@ -693,7 +693,7 @@ class _TestCondition(BaseTestCase): p.start() t = threading.Thread(target=self.f, args=(cond, sleeping, woken)) - t.set_daemon(True) + t.daemon = True t.start() # wait for them to all sleep diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 2427b8f..4ffea57 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -139,7 +139,7 @@ class SocketServerTest(unittest.TestCase): # Time between requests is short enough that we won't wake # up spuriously too many times. kwargs={'poll_interval':0.01}) - t.set_daemon(True) # In case this function raises. + t.daemon = True # In case this function raises. t.start() if verbose: print("server running") for i in range(3): |