summaryrefslogtreecommitdiffstats
path: root/test/runtest/noqmtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/runtest/noqmtest.py')
-rw-r--r--test/runtest/noqmtest.py29
1 files changed, 5 insertions, 24 deletions
diff --git a/test/runtest/noqmtest.py b/test/runtest/noqmtest.py
index 2ff4f65..78b021d 100644
--- a/test/runtest/noqmtest.py
+++ b/test/runtest/noqmtest.py
@@ -29,14 +29,12 @@ Test that the --noqmtest option invokes tests directly via Python, not
using qmtest.
"""
-import os.path
-import re
+import os
import string
import TestRuntest
-python = TestRuntest.python
-_python_ = TestRuntest._python_
+pythonstring = TestRuntest.pythonstring
test = TestRuntest.TestRuntest(noqmtest=1)
@@ -46,33 +44,16 @@ test_fail_py = os.path.join('test', 'fail.py')
test_no_result_py = os.path.join('test', 'no_result.py')
test_pass_py = os.path.join('test', 'pass.py')
-workpath_fail_py = test.workpath(test_fail_py)
-workpath_no_result_py = test.workpath(test_no_result_py)
-workpath_pass_py = test.workpath(test_pass_py)
-
test.write_failing_test(test_fail_py)
test.write_no_result_test(test_no_result_py)
test.write_passing_test(test_pass_py)
-if re.search('\s', python):
- expect_python = _python_
-else:
- expect_python = python
-
-def escape(s):
- return string.replace(s, '\\', '\\\\')
-
-expect_python = escape(expect_python)
-expect_workpath_fail_py = escape(test_fail_py)
-expect_workpath_no_result_py = escape(test_no_result_py)
-expect_workpath_pass_py = escape(test_pass_py)
-
expect_stdout = """\
-%(expect_python)s -tt %(expect_workpath_fail_py)s
+%(pythonstring)s -tt %(test_fail_py)s
FAILING TEST STDOUT
-%(expect_python)s -tt %(expect_workpath_no_result_py)s
+%(pythonstring)s -tt %(test_no_result_py)s
NO RESULT TEST STDOUT
-%(expect_python)s -tt %(expect_workpath_pass_py)s
+%(pythonstring)s -tt %(test_pass_py)s
PASSING TEST STDOUT
Failed the following test: