~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: 2010-08-23 17:54:07 UTC
  • mfrom: (5387 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5390.
  • Revision ID: john@arbash-meinel.com-20100823175407-yomx2h1x5v8amt6w
Merge bzr.dev 5387 in prep for NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
801
801
        self.requireFeature(test_lsprof.LSProfFeature)
802
802
        result_stream = StringIO()
803
803
        result = bzrlib.tests.VerboseTestResult(
804
 
            unittest._WritelnDecorator(result_stream),
 
804
            result_stream,
805
805
            descriptions=0,
806
806
            verbosity=2,
807
807
            )
862
862
        # verbose test output formatting
863
863
        result_stream = StringIO()
864
864
        result = bzrlib.tests.VerboseTestResult(
865
 
            unittest._WritelnDecorator(result_stream),
 
865
            result_stream,
866
866
            descriptions=0,
867
867
            verbosity=2,
868
868
            )
878
878
        output = result_stream.getvalue()[prefix:]
879
879
        lines = output.splitlines()
880
880
        self.assertContainsRe(lines[0], r'XFAIL *\d+ms$')
 
881
        if sys.version_info > (2, 7):
 
882
            self.expectFailure("_ExpectedFailure on 2.7 loses the message",
 
883
                self.assertNotEqual, lines[1], '    ')
881
884
        self.assertEqual(lines[1], '    foo')
882
885
        self.assertEqual(2, len(lines))
883
886
 
917
920
        # verbose test output formatting
918
921
        result_stream = StringIO()
919
922
        result = bzrlib.tests.VerboseTestResult(
920
 
            unittest._WritelnDecorator(result_stream),
 
923
            result_stream,
921
924
            descriptions=0,
922
925
            verbosity=2,
923
926
            )
1419
1422
        sample_test = TestTestCase("method_that_times_a_bit_twice")
1420
1423
        output_stream = StringIO()
1421
1424
        result = bzrlib.tests.VerboseTestResult(
1422
 
            unittest._WritelnDecorator(output_stream),
 
1425
            output_stream,
1423
1426
            descriptions=0,
1424
1427
            verbosity=2)
1425
1428
        sample_test.run(result)