diff options
author | Victor Stinner <vstinner@python.org> | 2019-12-09 16:34:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 16:34:02 (GMT) |
commit | a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b (patch) | |
tree | ffc1e3e7fc999d447331fb9cfd9d1cebf10177b2 /Lib/test/test_embed.py | |
parent | d219cc4180e7589807ebbef7421879f095e72a98 (diff) | |
download | cpython-a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b.zip cpython-a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b.tar.gz cpython-a1a99b4bb7cbe2dbc55a1d92c3c509b4466d3c3b.tar.bz2 |
bpo-20443: No longer make sys.argv[0] absolute for script (GH-17534)
In Python 3.9.0a1, sys.argv[0] was made an asolute path if a filename
was specified on the command line. Revert this change, since most
users expect sys.argv to be unmodified.
Diffstat (limited to 'Lib/test/test_embed.py')
-rw-r--r-- | Lib/test/test_embed.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index b87863a..60f7f7a 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -858,10 +858,9 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): preconfig = { 'allocator': PYMEM_ALLOCATOR_DEBUG, } - script_abspath = os.path.abspath('script.py') config = { - 'argv': [script_abspath], - 'run_filename': script_abspath, + 'argv': ['script.py'], + 'run_filename': os.path.abspath('script.py'), 'dev_mode': 1, 'faulthandler': 1, 'warnoptions': ['default'], |