Comments
Patch
@@ -1007,22 +1007,24 @@ class TestRunner(object):
'!': [],
'~': [],
's': [],
'i': [],
}
self.abort = [False]
self._createdfiles = []
- def run(self, tests):
+ def run(self, args):
"""Run the test suite."""
# Be kind and try to clean up after ourselves.
oldenv = dict(os.environ)
try:
+ tests = self.findtests(args)
+
return self._run(tests)
finally:
os.environ.clear()
os.environ.update(oldenv)
def _run(self, tests):
if self.options.random:
random.shuffle(tests)
@@ -1461,14 +1463,12 @@ def main(args, runner=None, parser=None)
parser = parser or getparser()
(options, args) = parseargs(args, parser)
runner.options = options
os.umask(022)
runner.checktools()
- tests = runner.findtests(args)
-
- return runner.run(tests)
+ return runner.run(args)
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))