diff options
Diffstat (limited to 'Lib/test/test_runpy.py')
-rw-r--r-- | Lib/test/test_runpy.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index f003086..84834d3 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -8,6 +8,7 @@ import tempfile import importlib, importlib.machinery, importlib.util import py_compile import warnings +import pathlib from test.support import ( forget, make_legacy_pyc, unload, verbose, no_tracing, create_empty_file, temp_dir) @@ -652,6 +653,14 @@ class RunPathTestCase(unittest.TestCase, CodeExecutionMixin): self._check_script(script_name, "<run_path>", script_name, script_name, expect_spec=False) + def test_basic_script_with_path_object(self): + with temp_dir() as script_dir: + mod_name = 'script' + script_name = pathlib.Path(self._make_test_script(script_dir, + mod_name)) + self._check_script(script_name, "<run_path>", script_name, + script_name, expect_spec=False) + def test_basic_script_no_suffix(self): with temp_dir() as script_dir: mod_name = 'script' |