Rev 4863: Fix a test timing-dependency issue in http://bazaar.launchpad.net/~vila/bzr/integration2

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Dec 4 10:58:40 GMT 2009


At http://bazaar.launchpad.net/~vila/bzr/integration2

------------------------------------------------------------
revno: 4863 [merge]
revision-id: v.ladeuil+lp at free.fr-20091204105830-07rhhsyg4aqn54ew
parent: pqm at pqm.ubuntu.com-20091204080756-orgsvo74a1jk13rs
parent: v.ladeuil+lp at free.fr-20091204090918-199zf26j4vw59s29
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: integration2
timestamp: Fri 2009-12-04 11:58:30 +0100
message:
  Fix a test timing-dependency issue
modified:
  bzrlib/tests/test_selftest.py  test_selftest.py-20051202044319-c110a115d8c0456a
-------------- next part --------------
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py	2009-11-24 02:25:23 +0000
+++ b/bzrlib/tests/test_selftest.py	2009-12-04 09:09:18 +0000
@@ -922,8 +922,10 @@
         result.report_unsupported(test, feature)
         output = result_stream.getvalue()[prefix:]
         lines = output.splitlines()
-        self.assertEqual(lines, ['NODEP        0ms',
-                                 "    The feature 'Feature' is not available."])
+        # We don't check for the final '0ms' since it may fail on slow hosts
+        self.assertStartsWith(lines[0], 'NODEP')
+        self.assertEqual(lines[1],
+                         "    The feature 'Feature' is not available.")
 
     def test_unavailable_exception(self):
         """An UnavailableFeature being raised should invoke addNotSupported."""



More information about the bazaar-commits mailing list