##// END OF EJS Templates
tests: use unittest.SkipTest...
Gregory Szorc -
r32932:240183a0 default
parent child Browse files
Show More
@@ -711,7 +711,7 b' class Test(unittest.TestCase):'
711 except KeyboardInterrupt:
711 except KeyboardInterrupt:
712 self._aborted = True
712 self._aborted = True
713 raise
713 raise
714 except SkipTest as e:
714 except unittest.SkipTest as e:
715 result.addSkip(self, str(e))
715 result.addSkip(self, str(e))
716 # The base class will have already counted this as a
716 # The base class will have already counted this as a
717 # test we "ran", but we want to exclude skipped tests
717 # test we "ran", but we want to exclude skipped tests
@@ -789,7 +789,7 b' class Test(unittest.TestCase):'
789 self.fail('hg have failed checking for %s' % failed[-1])
789 self.fail('hg have failed checking for %s' % failed[-1])
790 else:
790 else:
791 self._skipped = True
791 self._skipped = True
792 raise SkipTest(missing[-1])
792 raise unittest.SkipTest(missing[-1])
793 elif ret == 'timeout':
793 elif ret == 'timeout':
794 self.fail('timed out')
794 self.fail('timed out')
795 elif ret is False:
795 elif ret is False:
@@ -847,7 +847,7 b' class Test(unittest.TestCase):'
847
847
848 def _run(self, env):
848 def _run(self, env):
849 # This should be implemented in child classes to run tests.
849 # This should be implemented in child classes to run tests.
850 raise SkipTest('unknown test type')
850 raise unittest.SkipTest('unknown test type')
851
851
852 def abort(self):
852 def abort(self):
853 """Terminate execution of this test."""
853 """Terminate execution of this test."""
@@ -1486,9 +1486,6 b' class TTest(Test):'
1486
1486
1487 iolock = threading.RLock()
1487 iolock = threading.RLock()
1488
1488
1489 class SkipTest(Exception):
1490 """Raised to indicate that a test is to be skipped."""
1491
1492 class IgnoreTest(Exception):
1489 class IgnoreTest(Exception):
1493 """Raised to indicate that a test is to be ignored."""
1490 """Raised to indicate that a test is to be ignored."""
1494
1491
General Comments 0
You need to be logged in to leave comments. Login now