diff options
author | Benoit Pierre <benoit.pierre@gmail.com> | 2019-05-14 15:31:27 +0200 |
---|---|---|
committer | Benoit Pierre <benoit.pierre@gmail.com> | 2019-05-14 15:48:38 +0200 |
commit | f58549ab38eb6f5d1146510cbf15965aeb75c6fb (patch) | |
tree | b99b6ad6511d093557e3698c804a022f291f53a6 | |
parent | 83c667e0b2a98193851c07115d1af65011ed0fb6 (diff) | |
download | external_python_setuptools-f58549ab38eb6f5d1146510cbf15965aeb75c6fb.tar.gz external_python_setuptools-f58549ab38eb6f5d1146510cbf15965aeb75c6fb.tar.bz2 external_python_setuptools-f58549ab38eb6f5d1146510cbf15965aeb75c6fb.zip |
tests: fix_test_build_deps_on_distutils
* ignore distutils' warning (`Unknown distribution option: 'python_requires'`)
* fix test on Windows
-rw-r--r-- | setuptools/tests/test_integration.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/tests/test_integration.py b/setuptools/tests/test_integration.py index e54f3209..1e132188 100644 --- a/setuptools/tests/test_integration.py +++ b/setuptools/tests/test_integration.py @@ -141,6 +141,7 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): allowed_unknowns = [ 'test_suite', 'tests_require', + 'python_requires', 'install_requires', ] assert not match or match.group(1).strip('"\'') in allowed_unknowns @@ -149,8 +150,8 @@ def test_build_deps_on_distutils(request, tmpdir_factory, build_dep): def install(pkg_dir, install_dir): with open(os.path.join(pkg_dir, 'setuptools.py'), 'w') as breaker: breaker.write('raise ImportError()') - cmd = [sys.executable, 'setup.py', 'install', '--prefix', install_dir] - env = dict(os.environ, PYTHONPATH=pkg_dir) + cmd = [sys.executable, 'setup.py', 'install', '--prefix', str(install_dir)] + env = dict(os.environ, PYTHONPATH=str(pkg_dir)) output = subprocess.check_output( cmd, cwd=pkg_dir, env=env, stderr=subprocess.STDOUT) return output.decode('utf-8') |