mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
8cd0a66a0f
commit
aa98058cc4
86 changed files with 622 additions and 599 deletions
|
@ -153,7 +153,7 @@ class ThreadTests(BaseTestCase):
|
|||
tid = thread.start_new_thread(f, (mutex,))
|
||||
# Wait for the thread to finish.
|
||||
mutex.acquire()
|
||||
self.assertTrue(tid in threading._active)
|
||||
self.assertIn(tid, threading._active)
|
||||
self.assertTrue(isinstance(threading._active[tid],
|
||||
threading._DummyThread))
|
||||
del threading._active[tid]
|
||||
|
@ -356,7 +356,7 @@ class ThreadTests(BaseTestCase):
|
|||
t.start()
|
||||
t.join()
|
||||
l = enum()
|
||||
self.assertFalse(t in l,
|
||||
self.assertNotIn(t, l,
|
||||
"#1703448 triggered after %d trials: %s" % (i, l))
|
||||
finally:
|
||||
sys.setcheckinterval(old_interval)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue