Rev 2493: (Marien Zwart) Update test_selftest.test_elapsed_time_with... to be more forgiving in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu May 24 17:57:40 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2493
revision-id: pqm at pqm.ubuntu.com-20070524165738-rzs9lvgoqk20vls9
parent: pqm at pqm.ubuntu.com-20070524160700-3mu8f24yc5ej88m1
parent: john at arbash-meinel.com-20070524161253-rhy5ajcwxxfqk3sr
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-05-24 17:57:38 +0100
message:
  (Marien Zwart) Update test_selftest.test_elapsed_time_with... to be more forgiving
modified:
  bzrlib/tests/test_selftest.py  test_selftest.py-20051202044319-c110a115d8c0456a
    ------------------------------------------------------------
    revno: 2492.1.2
    merged: john at arbash-meinel.com-20070524161253-rhy5ajcwxxfqk3sr
    parent: john at arbash-meinel.com-20070524161045-t2dtfewkpnxeqlnp
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Thu 2007-05-24 11:12:53 -0500
    message:
      Tweak the regex a bit more
    ------------------------------------------------------------
    revno: 2492.1.1
    merged: john at arbash-meinel.com-20070524161045-t2dtfewkpnxeqlnp
    parent: pqm at pqm.ubuntu.com-20070524160700-3mu8f24yc5ej88m1
    parent: marienz at gentoo.org-20070511003934-5v54sk8ejgxgghst
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Thu 2007-05-24 11:10:45 -0500
    message:
      [merge] Marien Zwart: make test_elapsed_time more forgiving.
    ------------------------------------------------------------
    revno: 2485.2.1
    merged: marienz at gentoo.org-20070511003934-5v54sk8ejgxgghst
    parent: pqm at pqm.ubuntu.com-20070510055501-w262sk5hl33vmd19
    committer: Marien Zwart <marienz at gentoo.org>
    branch nick: fix-timed-tests
    timestamp: Fri 2007-05-11 02:39:34 +0200
    message:
      Make test_elapsed_time_with_benchmarking pass on a slow cpu.
=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py	2007-04-24 02:43:56 +0000
+++ b/bzrlib/tests/test_selftest.py	2007-05-24 16:12:53 +0000
@@ -620,18 +620,19 @@
         result.extractBenchmarkTime(self)
         timed_string = result._testTimeString()
         # without explicit benchmarking, we should get a simple time.
-        self.assertContainsRe(timed_string, "^ *[ 1-9][0-9]ms$")
+        self.assertContainsRe(timed_string, "^ +[0-9]+ms$")
         # if a benchmark time is given, we want a x of y style result.
         self.time(time.sleep, 0.001)
         result.extractBenchmarkTime(self)
         timed_string = result._testTimeString()
-        self.assertContainsRe(timed_string, "^ *[ 1-9][0-9]ms/ *[ 1-9][0-9]ms$")
+        self.assertContainsRe(
+            timed_string, "^ +[0-9]+ms/ +[0-9]+ms$")
         # extracting the time from a non-bzrlib testcase sets to None
         result._recordTestStartTime()
         result.extractBenchmarkTime(
             unittest.FunctionTestCase(self.test_elapsed_time_with_benchmarking))
         timed_string = result._testTimeString()
-        self.assertContainsRe(timed_string, "^ *[ 1-9][0-9]ms$")
+        self.assertContainsRe(timed_string, "^ +[0-9]+ms$")
         # cheat. Yes, wash thy mouth out with soap.
         self._benchtime = None
 




More information about the bazaar-commits mailing list