summaryrefslogtreecommitdiff
path: root/test/runtest/baseline/no_result.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/runtest/baseline/no_result.py')
-rw-r--r--test/runtest/baseline/no_result.py38
1 files changed, 21 insertions, 17 deletions
diff --git a/test/runtest/baseline/no_result.py b/test/runtest/baseline/no_result.py
index d00f5364f..ce6f20cbb 100644
--- a/test/runtest/baseline/no_result.py
+++ b/test/runtest/baseline/no_result.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,43 +22,45 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Test how we handle a no-results test specified on the command line.
"""
+import os
+
import TestRuntest
pythonstring = TestRuntest.pythonstring
pythonflags = TestRuntest.pythonflags
+test_no_result_py = os.path.join('test', 'no_result.py')
test = TestRuntest.TestRuntest()
-
test.subdir('test')
-
test.write_no_result_test(['test', 'no_result.py'])
-expect_stdout = """\
-%(pythonstring)s%(pythonflags)s test/no_result.py
+expect_stdout = f"""\
+{pythonstring}{pythonflags} {test_no_result_py}
NO RESULT TEST STDOUT
-""" % locals()
+"""
expect_stderr = """\
NO RESULT TEST STDERR
"""
-test.run(arguments='--no-ignore-skips -k -b . test/no_result.py',
- status=2,
- stdout=expect_stdout,
- stderr=expect_stderr)
+test.run(
+ arguments='--no-ignore-skips -k -b . test/no_result.py',
+ status=2,
+ stdout=expect_stdout,
+ stderr=expect_stderr,
+)
-test.run(arguments='-k -b . test/no_result.py',
- status=0,
- stdout=expect_stdout,
- stderr=expect_stderr)
+test.run(
+ arguments='-k -b . test/no_result.py',
+ status=0,
+ stdout=expect_stdout,
+ stderr=expect_stderr,
+)
test.pass_test()