~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: John Arbash Meinel
  • Date: 2006-06-30 17:25:27 UTC
  • mto: (1711.4.39 win32-accepted)
  • mto: This revision was merged to the branch mainline in revision 1836.
  • Revision ID: john@arbash-meinel.com-20060630172527-6d36c06a13dc7110
always close files, minor PEP8 cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
507
507
        #           1        0            ???         ???       ???(sleep) 
508
508
        # and then repeated but with 'world', rather than 'hello'.
509
509
        # this should appear in the output stream of our test result.
510
 
        output = result_stream.getvalue()
511
 
        self.assertContainsRe(output,
512
 
            r"LSProf output for <type 'unicode'>\(\('hello',\), {'errors': 'replace'}\)")
513
 
        self.assertContainsRe(output,
514
 
            r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n")
515
 
        self.assertContainsRe(output,
516
 
            r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?")
517
 
        self.assertContainsRe(output,
518
 
            r"LSProf output for <type 'unicode'>\(\('world',\), {'errors': 'replace'}\)\n")
 
510
        self.assertContainsRe(result_stream.getvalue(), 
 
511
            r"LSProf output for <type 'unicode'>\(\('hello',\), {'errors': 'replace'}\)\n"
 
512
            r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n"
 
513
            r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?"
 
514
            r"LSProf output for <type 'unicode'>\(\('world',\), {'errors': 'replace'}\)\n"
 
515
            r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n"
 
516
            r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?"
 
517
            )
519
518
 
520
519
 
521
520
class TestRunner(TestCase):