[patch] fix lsprof regexps
Martin Pool
mbp at canonical.com
Mon Jul 3 08:20:47 BST 2006
The lsprof test is a bit too detailed and fails on my dapper
installation. I think it's being skipped by pqm because lsprof isn't
installed on the machine that runs it.
This patch makes the test a bit looser but I think still keeps the
general intent.
=== modified file 'bzrlib/tests/test_selftest.py'
--- bzrlib/tests/test_selftest.py 2006-06-29 16:51:04 +0000
+++ bzrlib/tests/test_selftest.py 2006-07-03 05:38:06 +0000
@@ -507,14 +507,15 @@
# 1 0 ??? ??? ???(sleep)
# and then repeated but with 'world', rather than 'hello'.
# this should appear in the output stream of our test result.
- self.assertContainsRe(result_stream.getvalue(),
- r"LSProf output for <type 'unicode'>\(\('hello',\), {'errors': 'replace'}\)\n"
- r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n"
- r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?"
- r"LSProf output for <type 'unicode'>\(\('world',\), {'errors': 'replace'}\)\n"
- r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n"
- r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?"
- )
+ output = result_stream.getvalue()
+ self.assertContainsRe(output,
+ r"LSProf output for <type 'unicode'>\(\('hello',\), {'errors': 'replace'}\)")
+ self.assertContainsRe(output,
+ r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n")
+ self.assertContainsRe(output,
+ r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?")
+ self.assertContainsRe(output,
+ r"LSProf output for <type 'unicode'>\(\('world',\), {'errors': 'replace'}\)\n")
class TestRunner(TestCase):
--
Martin
More information about the bazaar
mailing list