run-tests: replace Test.ignore() with raise IgnoreTest
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Apr 2014 17:10:49 -0700
changeset 21491 e9faeb21f954
parent 21490 588ebd47cd87
child 21492 a9c4f4912402
run-tests: replace Test.ignore() with raise IgnoreTest
tests/run-tests.py
--- a/tests/run-tests.py	Sun Apr 20 17:09:52 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 17:10:49 2014 -0700
@@ -466,7 +466,7 @@
                 raise SkipTest('blacklisted')
 
             if options.retest and not os.path.exists('%s.err' % self.name):
-                return self.ignore('not retesting')
+                raise IgnoreTest('not retesting')
 
             if options.keywords:
                 f = open(self.name)
@@ -476,7 +476,7 @@
                     if k in t:
                         break
                     else:
-                        return self.ignore("doesn't match keyword")
+                        raise IgnoreTest("doesn't match keyword")
 
         if not os.path.basename(self.name.lower()).startswith('test-'):
             raise SkipTest('not a test file')
@@ -687,9 +687,6 @@
             # Failed is denoted by AssertionError (by default at least).
             raise AssertionError(msg)
 
-    def ignore(self, msg):
-        raise IgnoreTest(msg)
-
 class PythonTest(Test):
     """A Python-based test."""
     def _run(self, replacements, env):