mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
gh-99437: runpy: decode path-like objects before setting globals
This commit is contained in:
parent
3eae76554b
commit
d457345bbc
3 changed files with 14 additions and 9 deletions
|
@ -661,8 +661,10 @@ class RunPathTestCase(unittest.TestCase, CodeExecutionMixin):
|
|||
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)
|
||||
self._check_script(script_name, "<run_path>",
|
||||
os.fsdecode(script_name),
|
||||
os.fsdecode(script_name),
|
||||
expect_spec=False)
|
||||
|
||||
def test_basic_script_no_suffix(self):
|
||||
with temp_dir() as script_dir:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue