summaryrefslogtreecommitdiffstats
path: root/test/runtest/simple
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-03-01 16:46:54 (GMT)
committerMats Wichmann <mats@linux.com>2019-03-01 17:10:38 (GMT)
commit83c4b8ff692066bf29daa9a6aebf10818a914475 (patch)
treeec26b4b7a17b95aa512273f627d11f0093d6741d /test/runtest/simple
parentf765b5c4fa6b41de214b243daa6dd3ad6356dfe2 (diff)
downloadSCons-83c4b8ff692066bf29daa9a6aebf10818a914475.zip
SCons-83c4b8ff692066bf29daa9a6aebf10818a914475.tar.gz
SCons-83c4b8ff692066bf29daa9a6aebf10818a914475.tar.bz2
[WIP] for #3304: drop use of -tt if py3
As noted in issue #3304, the Python flag to error on inconsistent tabs/spaces has been dropped for Python 3 interpreters; while CPython still accepts it, silently ignoring it, PyPy3 errors out. This change adds the flag throughout the testsuite run only if using a Python2 interpreter. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/runtest/simple')
-rw-r--r--test/runtest/simple/combined.py7
-rw-r--r--test/runtest/simple/fail.py3
-rw-r--r--test/runtest/simple/no_result.py3
-rw-r--r--test/runtest/simple/pass.py3
4 files changed, 10 insertions, 6 deletions
diff --git a/test/runtest/simple/combined.py b/test/runtest/simple/combined.py
index 616f4d5..ec0a1bb 100644
--- a/test/runtest/simple/combined.py
+++ b/test/runtest/simple/combined.py
@@ -37,6 +37,7 @@ import TestRuntest
test = TestRuntest.TestRuntest()
pythonstring = TestRuntest.pythonstring
+pythonflags = TestRuntest.pythonflags
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')
@@ -50,11 +51,11 @@ test.write_no_result_test(['test', 'no_result.py'])
test.write_passing_test(['test', 'pass.py'])
expect_stdout = """\
-%(pythonstring)s -tt %(test_fail_py)s
+%(pythonstring)s%(pythonflags)s %(test_fail_py)s
FAILING TEST STDOUT
-%(pythonstring)s -tt %(test_no_result_py)s
+%(pythonstring)s%(pythonflags)s %(test_no_result_py)s
NO RESULT TEST STDOUT
-%(pythonstring)s -tt %(test_pass_py)s
+%(pythonstring)s%(pythonflags)s %(test_pass_py)s
PASSING TEST STDOUT
Failed the following test:
diff --git a/test/runtest/simple/fail.py b/test/runtest/simple/fail.py
index 8b800fb..f26f00e 100644
--- a/test/runtest/simple/fail.py
+++ b/test/runtest/simple/fail.py
@@ -31,6 +31,7 @@ Test how we handle a failing test specified on the command line.
import TestRuntest
pythonstring = TestRuntest.pythonstring
+pythonflags = TestRuntest.pythonflags
test = TestRuntest.TestRuntest()
@@ -39,7 +40,7 @@ test.subdir('test')
test.write_failing_test(['test', 'fail.py'])
expect_stdout = """\
-%(pythonstring)s -tt test/fail.py
+%(pythonstring)s%(pythonflags)s test/fail.py
FAILING TEST STDOUT
""" % locals()
diff --git a/test/runtest/simple/no_result.py b/test/runtest/simple/no_result.py
index 91af7e4..2fd40b4 100644
--- a/test/runtest/simple/no_result.py
+++ b/test/runtest/simple/no_result.py
@@ -31,6 +31,7 @@ Test how we handle a no-results test specified on the command line.
import TestRuntest
pythonstring = TestRuntest.pythonstring
+pythonflags = TestRuntest.pythonflags
test = TestRuntest.TestRuntest()
@@ -39,7 +40,7 @@ test.subdir('test')
test.write_no_result_test(['test', 'no_result.py'])
expect_stdout = """\
-%(pythonstring)s -tt test/no_result.py
+%(pythonstring)s%(pythonflags)s test/no_result.py
NO RESULT TEST STDOUT
""" % locals()
diff --git a/test/runtest/simple/pass.py b/test/runtest/simple/pass.py
index 6e5b6b0..7ceb9a0 100644
--- a/test/runtest/simple/pass.py
+++ b/test/runtest/simple/pass.py
@@ -31,6 +31,7 @@ Test how we handle a passing test specified on the command line.
import TestRuntest
pythonstring = TestRuntest.pythonstring
+pythonflags = TestRuntest.pythonflags
test = TestRuntest.TestRuntest()
@@ -39,7 +40,7 @@ test.subdir('test')
test.write_passing_test(['test', 'pass.py'])
expect_stdout = """\
-%(pythonstring)s -tt test/pass.py
+%(pythonstring)s%(pythonflags)s test/pass.py
PASSING TEST STDOUT
""" % locals()