changeset 21311:f9a7018a35ff

run-tests: roll pytest() into PythonTest._run() Python was the old runner function. It no longer needs to exist since the PythonTest class took its job.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 19 Apr 2014 14:54:04 -0700
parents af9a04951c69
children 986b8a58a6d3
files tests/run-tests.py
diffstat 1 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sat Apr 19 14:51:43 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 14:54:04 2014 -0700
@@ -675,19 +675,16 @@
         """Whether the test was skipped."""
         return self.ret == SKIPPED_STATUS
 
-def pytest(test, wd, options, replacements, env):
-    py3kswitch = options.py3k_warnings and ' -3' or ''
-    cmd = '%s%s "%s"' % (PYTHON, py3kswitch, test)
-    vlog("# Running", cmd)
-    if os.name == 'nt':
-        replacements.append((r'\r\n', '\n'))
-    return run(cmd, wd, options, replacements, env)
-
 class PythonTest(Test):
     """A Python-based test."""
     def _run(self, testtmp, replacements, env):
-        return pytest(self._path, testtmp, self._options, replacements,
-                      env)
+        py3kswitch = self._options.py3k_warnings and ' -3' or ''
+        cmd = '%s%s "%s"' % (PYTHON, py3kswitch, self._path)
+        vlog("# Running", cmd)
+        if os.name == 'nt':
+            replacements.append((r'\r\n', '\n'))
+        return run(cmd, testtmp, self._options, replacements, env)
+
 
 needescape = re.compile(r'[\x00-\x08\x0b-\x1f\x7f-\xff]').search
 escapesub = re.compile(r'[\x00-\x08\x0b-\x1f\\\x7f-\xff]').sub