From b7e0eec3d794ee350f8a4392a0c9cc90fff54fa0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 18 Nov 2018 19:41:30 -0500 Subject: PyRunner knows how to run Python files. Adjust sys.path to better emulate Python, but only if we should. --- tests/modules/pkg1/__main__.py | 2 +- tests/modules/pkg1/runmod2.py | 2 +- tests/modules/pkg1/sub/__main__.py | 2 +- tests/modules/pkg1/sub/runmod3.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/modules/pkg1') diff --git a/tests/modules/pkg1/__main__.py b/tests/modules/pkg1/__main__.py index 66ce5956..0d38e33e 100644 --- a/tests/modules/pkg1/__main__.py +++ b/tests/modules/pkg1/__main__.py @@ -1,3 +1,3 @@ -# Used in the tests for run_python_module +# Used in the tests for PyRunner import sys print("pkg1.__main__: passed %s" % sys.argv[1]) diff --git a/tests/modules/pkg1/runmod2.py b/tests/modules/pkg1/runmod2.py index b0f43c2e..e2778669 100644 --- a/tests/modules/pkg1/runmod2.py +++ b/tests/modules/pkg1/runmod2.py @@ -1,6 +1,6 @@ # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt -# Used in the tests for run_python_module +# Used in the tests for PyRunner import sys print("runmod2: passed %s" % sys.argv[1]) diff --git a/tests/modules/pkg1/sub/__main__.py b/tests/modules/pkg1/sub/__main__.py index b5be9f1c..1af82c43 100644 --- a/tests/modules/pkg1/sub/__main__.py +++ b/tests/modules/pkg1/sub/__main__.py @@ -1,3 +1,3 @@ -# Used in the tests for run_python_module +# Used in the tests for PyRunner import sys print("pkg1.sub.__main__: passed %s" % sys.argv[1]) diff --git a/tests/modules/pkg1/sub/runmod3.py b/tests/modules/pkg1/sub/runmod3.py index b3b40327..d2be9e5c 100644 --- a/tests/modules/pkg1/sub/runmod3.py +++ b/tests/modules/pkg1/sub/runmod3.py @@ -1,6 +1,6 @@ # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt -# Used in the tests for run_python_module +# Used in the tests for PyRunner import sys print("runmod3: passed %s" % sys.argv[1]) -- cgit v1.2.1