Rev 5224: Selftest was failing with testtools 0.9.3, which caused an in http://bazaar.launchpad.net/~lifeless/bzr/newtesttools
Robert Collins
robertc at robertcollins.net
Fri May 14 07:52:30 BST 2010
At http://bazaar.launchpad.net/~lifeless/bzr/newtesttools
------------------------------------------------------------
revno: 5224
revision-id: robertc at robertcollins.net-20100514065155-3i2woxe123650ib2
parent: pqm at pqm.ubuntu.com-20100511114736-mc1sq9zyo3vufec7
committer: Robert Collins <robertc at robertcollins.net>
branch nick: newtesttools
timestamp: Fri 2010-05-14 18:51:55 +1200
message:
Selftest was failing with testtools 0.9.3, which caused an
AssertionError raised from a cleanUp to be reported as a Failure, not an
Error, breaking on of our test hygiene tests.
(Robert Collins, Vincent Ladeuil).
=== modified file 'NEWS'
--- a/NEWS 2010-05-11 08:44:59 +0000
+++ b/NEWS 2010-05-14 06:51:55 +0000
@@ -97,6 +97,11 @@
* Reduce peak memory by one copy of compressed text.
(John Arbash Meinel, #566940)
+* Selftest was failing with testtools 0.9.3, which caused an
+ AssertionError raised from a cleanUp to be reported as a Failure, not an
+ Error, breaking on of our test hygiene tests.
+ (Robert Collins, Vincent Ladeuil).
+
* Show the filenames when a file rename fails so that the error will be
more comprehensible.
(Martin Pool, #491763)
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py 2010-04-22 18:36:13 +0000
+++ b/bzrlib/tests/test_selftest.py 2010-05-14 06:51:55 +0000
@@ -609,12 +609,13 @@
l.attempt_lock()
test = TestDanglingLock('test_function')
result = test.run()
+ total_failures = result.errors + result.failures
if self._lock_check_thorough:
- self.assertEqual(1, len(result.errors))
+ self.assertLength(1, total_failures)
else:
# When _lock_check_thorough is disabled, then we don't trigger a
# failure
- self.assertEqual(0, len(result.errors))
+ self.assertLength(0, total_failures)
class TestTestCaseWithTransport(tests.TestCaseWithTransport):
More information about the bazaar-commits
mailing list