Commit f58549ab authored by Benoit Pierre's avatar Benoit Pierre

tests: fix_test_build_deps_on_distutils

* ignore distutils' warning (`Unknown distribution option: 'python_requires'`)
* fix test on Windows
parent 83c667e0
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment