[issue21137] Better repr for threading.Lock()
Raymond Hettinger
report at bugs.python.org
Fri May 23 05:02:10 CEST 2014
Raymond Hettinger added the comment:
The patch is just about ready to go but needs to address some failing tests:
======================================================================
FAIL: test_locked_repr (test.test_importlib.test_locks.Frozen_ModuleLockAsRLockTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/raymond/cpython/Lib/test/lock_tests.py", line 91, in test_locked_repr
self.assertRegex(repr(lock), "<locked .* object (.*)?at .*>")
AssertionError: Regex didn't match: '<locked .* object (.*)?at .*>' not found in "_ModuleLock('some_lock') at 4438138048"
======================================================================
FAIL: test_repr (test.test_importlib.test_locks.Frozen_ModuleLockAsRLockTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/raymond/cpython/Lib/test/lock_tests.py", line 85, in test_repr
self.assertRegex(repr(lock), "<unlocked .* object (.*)?at .*>")
AssertionError: Regex didn't match: '<unlocked .* object (.*)?at .*>' not found in "_ModuleLock('some_lock') at 4439151784"
======================================================================
FAIL: test_locked_repr (test.test_importlib.test_locks.Source_ModuleLockAsRLockTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/raymond/cpython/Lib/test/lock_tests.py", line 91, in test_locked_repr
self.assertRegex(repr(lock), "<locked .* object (.*)?at .*>")
AssertionError: Regex didn't match: '<locked .* object (.*)?at .*>' not found in "_ModuleLock('some_lock') at 4438192312"
======================================================================
FAIL: test_repr (test.test_importlib.test_locks.Source_ModuleLockAsRLockTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/raymond/cpython/Lib/test/lock_tests.py", line 85, in test_repr
self.assertRegex(repr(lock), "<unlocked .* object (.*)?at .*>")
AssertionError: Regex didn't match: '<unlocked .* object (.*)?at .*>' not found in "_ModuleLock('some_lock') at 4438192480"
----------------------------------------------------------------------
Ran 970 tests in 0.549s
FAILED (failures=4, skipped=7, expected failures=1)
test test_importlib failed
1 test failed:
test_importlib
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21137>
_______________________________________
More information about the Python-bugs-list
mailing list