mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
#9424: Replace deprecated assert* methods in the Python test suite.
This commit is contained in:
parent
b8bc439b20
commit
b3aedd4862
170 changed files with 2388 additions and 2392 deletions
|
@ -398,17 +398,17 @@ class ThreadTests(BaseTestCase):
|
|||
weak_cyclic_object = weakref.ref(cyclic_object)
|
||||
cyclic_object.thread.join()
|
||||
del cyclic_object
|
||||
self.assertEquals(None, weak_cyclic_object(),
|
||||
msg=('%d references still around' %
|
||||
sys.getrefcount(weak_cyclic_object())))
|
||||
self.assertEqual(None, weak_cyclic_object(),
|
||||
msg=('%d references still around' %
|
||||
sys.getrefcount(weak_cyclic_object())))
|
||||
|
||||
raising_cyclic_object = RunSelfFunction(should_raise=True)
|
||||
weak_raising_cyclic_object = weakref.ref(raising_cyclic_object)
|
||||
raising_cyclic_object.thread.join()
|
||||
del raising_cyclic_object
|
||||
self.assertEquals(None, weak_raising_cyclic_object(),
|
||||
msg=('%d references still around' %
|
||||
sys.getrefcount(weak_raising_cyclic_object())))
|
||||
self.assertEqual(None, weak_raising_cyclic_object(),
|
||||
msg=('%d references still around' %
|
||||
sys.getrefcount(weak_raising_cyclic_object())))
|
||||
|
||||
def test_old_threading_api(self):
|
||||
# Just a quick sanity check to make sure the old method names are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue