~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Aaron Bentley
  • Date: 2007-08-15 11:24:06 UTC
  • mfrom: (2702 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2703.
  • Revision ID: aaron.bentley@utoronto.ca-20070815112406-lyv23omlm0wgsu42
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
990
990
        # and not count as an error
991
991
        self.assertEqual(0, result.error_count)
992
992
 
 
993
    def test_strict_with_unsupported_feature(self):
 
994
        result = bzrlib.tests.TextTestResult(self._log_file, descriptions=0,
 
995
                                                verbosity=1)
 
996
        test = self.get_passing_test()
 
997
        feature = "Unsupported Feature"
 
998
        result.addNotSupported(test, feature)
 
999
        self.assertFalse(result.wasStrictlySuccessful())
 
1000
 
 
1001
    def test_strict_with_known_failure(self):
 
1002
        result = bzrlib.tests.TextTestResult(self._log_file, descriptions=0,
 
1003
                                                verbosity=1)
 
1004
        test = self.get_passing_test()
 
1005
        err = (KnownFailure, KnownFailure('foo'), None)
 
1006
        result.addKnownFailure(test, err)
 
1007
        self.assertFalse(result.wasStrictlySuccessful())
 
1008
 
 
1009
    def test_strict_with_success(self):
 
1010
        result = bzrlib.tests.TextTestResult(self._log_file, descriptions=0,
 
1011
                                                verbosity=1)
 
1012
        test = self.get_passing_test()
 
1013
        result.addSuccess(test)
 
1014
        self.assertTrue(result.wasStrictlySuccessful())
 
1015
 
993
1016
 
994
1017
class TestRunner(TestCase):
995
1018