cpython/Lib/distutils/tests
Victor Stinner 394b991e41
[3.7] bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12862)
* bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858)

shutil.which() and distutils.spawn.find_executable() now use
os.confstr("CS_PATH") if available instead of os.defpath, if the PATH
environment variable is not set.

Don't use os.confstr("CS_PATH") nor os.defpath if the PATH
environment variable is set to an empty string.

Changes:

* find_executable() now starts by checking for the executable in the
  current working directly case. Add an explicit
  "if not path: return None".
* Add tests for PATH='' (empty string), PATH=':' and for PATHEXT.

(cherry picked from commit 228a3c99bd)

* bpo-35755: Remove current directory from posixpath.defpath (GH-11586)

Document the change in a NEWS entry of the Security category.

(cherry picked from commit 2c4c02f8a8)
2019-04-17 18:38:06 +02:00
..
Setup.sample
__init__.py
includetest.rst bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605) 2019-03-27 15:25:57 -07:00
support.py
test_archive_util.py bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) 2018-12-05 12:29:31 -08:00
test_bdist.py
test_bdist_dumb.py bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) 2018-12-05 12:29:31 -08:00
test_bdist_msi.py
test_bdist_rpm.py
test_bdist_wininst.py
test_build.py
test_build_clib.py
test_build_ext.py bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744) 2019-02-04 17:54:59 -08:00
test_build_py.py
test_build_scripts.py
test_check.py bpo-31292: Fixed distutils check --restructuredtext for include directives (GH-10605) 2019-03-27 15:25:57 -07:00
test_clean.py
test_cmd.py
test_config.py
test_config_cmd.py
test_core.py
test_cygwinccompiler.py
test_dep_util.py
test_dir_util.py
test_dist.py
test_extension.py
test_file_util.py
test_filelist.py
test_install.py
test_install_data.py
test_install_headers.py
test_install_lib.py
test_install_scripts.py
test_log.py bpo-34421: Improve distutils logging for non-ASCII strings. (GH-9126) (GH-9506) 2018-09-23 10:31:53 +03:00
test_msvc9compiler.py
test_msvccompiler.py
test_register.py
test_sdist.py bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419) 2018-12-05 12:29:31 -08:00
test_spawn.py [3.7] bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12862) 2019-04-17 18:38:06 +02:00
test_sysconfig.py bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764) 2019-04-10 16:58:55 -07:00
test_text_file.py
test_unixccompiler.py
test_upload.py
test_util.py bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) 2018-12-18 07:34:54 -08:00
test_version.py
test_versionpredicate.py