[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file
STINNER Victor
report at bugs.python.org
Thu Jan 25 12:32:17 EST 2018
STINNER Victor <victor.stinner at gmail.com> added the comment:
Attached PR 5322 fixes the issue.
Example to reproduce the bug:
$ touch file
$ PATH=$PATH:$PWD/file ./python -m test test_subprocess -m test_invalid_args -v
(...)
======================================================================
ERROR: test_invalid_args (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/vstinner/prog/python/master/Lib/test/test_subprocess.py", line 3050, in test_invalid_args
stderr=subprocess.PIPE) as proc:
File "/home/vstinner/prog/python/master/Lib/subprocess.py", line 743, in __init__
restore_signals, start_new_session)
File "/home/vstinner/prog/python/master/Lib/subprocess.py", line 1431, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'nonexisting_i_hope'
(...)
With PR 5322 applied, the whole Python test suite pass with PATH=$PATH:$PWD/file.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32667>
_______________________________________
More information about the Python-bugs-list
mailing list