mirror of
https://github.com/python/cpython.git
synced 2025-10-16 19:57:59 +00:00
Merged revisions 65818 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r65818 | benjamin.peterson | 2008-08-18 11:40:03 -0500 (Mon, 18 Aug 2008) | 4 lines change threading.getIdent to a property This is new in 2.6 so now need to worry about backwards compatibility :) ........
This commit is contained in:
parent
46f5f9ee0f
commit
773c17b3e1
3 changed files with 8 additions and 7 deletions
|
@ -74,7 +74,7 @@ class ThreadTests(unittest.TestCase):
|
|||
for i in range(NUMTASKS):
|
||||
t = TestThread("<thread %d>"%i, self, sema, mutex, numrunning)
|
||||
threads.append(t)
|
||||
self.failUnlessEqual(t.get_ident(), None)
|
||||
self.failUnlessEqual(t.ident, None)
|
||||
self.assert_(re.match('<TestThread\(.*, initial\)>', repr(t)))
|
||||
t.start()
|
||||
|
||||
|
@ -83,7 +83,7 @@ class ThreadTests(unittest.TestCase):
|
|||
for t in threads:
|
||||
t.join(NUMTASKS)
|
||||
self.assert_(not t.is_alive())
|
||||
self.failIfEqual(t.get_ident(), 0)
|
||||
self.failIfEqual(t.ident, 0)
|
||||
self.assert_(re.match('<TestThread\(.*, \w+ -?\d+\)>', repr(t)))
|
||||
if verbose:
|
||||
print('all tasks done')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue