[patch] fix lsprof regexps
John Arbash Meinel
john at arbash-meinel.com
Mon Jul 3 14:29:59 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> 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.
>
Seems reasonable to me. We've certainly had lsprof failures, depending
on what version of lsprof you are using.
John
=:->
>
> === 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):
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEqRvXJdeBCYSNAAMRAmw5AJ9dHdc44Z366AU9wCuU2x5p2BMyeQCeKd/3
RxV7stH83qHTvB57NbdJchw=
=H1Ab
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list