~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-09 06:36:01 UTC
  • mfrom: (2687.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070809063601-esywbsbqp7zcs4x9
Add selftest --strict

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