Rev 2430: (John Arbash Meinel) Remove the time dependency for a couple tests. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Apr 19 22:32:45 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2430
revision-id: pqm at pqm.ubuntu.com-20070419213243-7s1gu2czd44bht1t
parent: pqm at pqm.ubuntu.com-20070419203013-exud3vftmox30imx
parent: john at arbash-meinel.com-20070413202923-al52jvkh1g7e2lsm
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-04-19 22:32:43 +0100
message:
(John Arbash Meinel) Remove the time dependency for a couple tests.
modified:
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
------------------------------------------------------------
revno: 2418.3.1
merged: john at arbash-meinel.com-20070413202923-al52jvkh1g7e2lsm
parent: pqm at pqm.ubuntu.com-20070413174100-zpfqleaf5ph9ycx4
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: xfail_no_time
timestamp: Fri 2007-04-13 15:29:23 -0500
message:
Remove timing dependencies from the selftest tests.
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py 2007-04-12 00:59:53 +0000
+++ b/bzrlib/tests/test_selftest.py 2007-04-13 20:29:23 +0000
@@ -739,8 +739,10 @@
result.report_known_failure(test, err)
output = result_stream.getvalue()[prefix:]
lines = output.splitlines()
- self.assertEqual(lines, ['XFAIL 0ms', ' foo'])
-
+ self.assertContainsRe(lines[0], r'XFAIL *\d+ms$')
+ self.assertEqual(lines[1], ' foo')
+ self.assertEqual(2, len(lines))
+
def test_text_report_known_failure(self):
# text test output formatting
pb = MockProgress()
@@ -933,13 +935,12 @@
stream = StringIO()
runner = TextTestRunner(stream=stream)
result = self.run_test_runner(runner, test)
- self.assertEqual(
- '\n'
- '----------------------------------------------------------------------\n'
- 'Ran 1 test in 0.000s\n'
- '\n'
- 'OK (known_failures=1)\n',
- stream.getvalue())
+ self.assertContainsRe(stream.getvalue(),
+ '\n'
+ '-*\n'
+ 'Ran 1 test in .*\n'
+ '\n'
+ 'OK \\(known_failures=1\\)\n')
def test_skipped_test(self):
# run a test that is skipped, and check the suite as a whole still
More information about the bazaar-commits
mailing list