diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-20 10:12:28 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-20 10:12:28 +0300 |
commit | 10feba3fadebd2140b1db68f7cfa9c3fa83ad883 (patch) | |
tree | c79da0abd98042ec814f02ee84c6e7c98b6fd964 /Lib/test/test_runpy.py | |
parent | 446ca43cfdeb0c219464503a317644d10969e96e (diff) | |
parent | db5cc8c08191353e886cf2c6673e3b2323db1974 (diff) | |
download | cpython-10feba3fadebd2140b1db68f7cfa9c3fa83ad883.tar.gz |
Issue #23908: os functions now reject paths with embedded null character
on Windows instead of silently truncate them.
Removed no longer used _PyUnicode_HasNULChars().
Diffstat (limited to 'Lib/test/test_runpy.py')
-rw-r--r-- | Lib/test/test_runpy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 786b813b32..81caff8d58 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -8,7 +8,7 @@ import tempfile import importlib, importlib.machinery, importlib.util import py_compile from test.support import ( - forget, make_legacy_pyc, run_unittest, unload, verbose, no_tracing, + forget, make_legacy_pyc, unload, verbose, no_tracing, create_empty_file) from test.script_helper import ( make_pkg, make_script, make_zip_pkg, make_zip_script, temp_dir) @@ -269,7 +269,7 @@ class RunModuleTestCase(unittest.TestCase, CodeExecutionMixin): if verbose > 1: print(ex) # Persist with cleaning up def _fix_ns_for_legacy_pyc(self, ns, alter_sys): - char_to_add = "c" if __debug__ else "o" + char_to_add = "c" ns["__file__"] += char_to_add ns["__cached__"] = ns["__file__"] spec = ns["__spec__"] |