diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-15 05:13:50 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-15 05:13:50 -0400 |
commit | c48365a763ea41d3f9e6298b3becbe73045ff9a1 (patch) | |
tree | 48cc65ec2b23e3418286630b7e9eca345c4303f5 /setuptools/tests/test_virtualenv.py | |
parent | 2f1d7173a196268008938e234e9e796bc6761b27 (diff) | |
download | python-setuptools-git-c48365a763ea41d3f9e6298b3becbe73045ff9a1.tar.gz |
Avoid reliance on shell details in test_virtualenv.
Diffstat (limited to 'setuptools/tests/test_virtualenv.py')
-rw-r--r-- | setuptools/tests/test_virtualenv.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index a62e564c..555273ae 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -112,10 +112,9 @@ def test_pip_upgrade_from_source(pip_version, virtualenv): dist_dir = virtualenv.workspace # Generate source distribution / wheel. virtualenv.run(' && '.join(( - 'cd {source}', 'python setup.py -q sdist -d {dist}', 'python setup.py -q bdist_wheel -d {dist}', - )).format(source=SOURCE_DIR, dist=dist_dir)) + )).format(dist=dist_dir), cd=SOURCE_DIR) sdist = glob.glob(os.path.join(dist_dir, '*.zip'))[0] wheel = glob.glob(os.path.join(dist_dir, '*.whl'))[0] # Then update from wheel. @@ -180,10 +179,8 @@ def _check_test_command_install_requirements(virtualenv, tmpdir): open('success', 'w').close() ''')) # Run test command for test package. - virtualenv.run(' && '.join(( - 'cd {tmpdir}', - 'python setup.py test -s test', - )).format(tmpdir=tmpdir)) + virtualenv.run( + ['python', 'setup.py', 'test', '-s', 'test'], cd=str(tmpdir)) assert tmpdir.join('success').check() @@ -204,7 +201,5 @@ def test_no_missing_dependencies(bare_virtualenv): Quick and dirty test to ensure all external dependencies are vendored. """ for command in ('upload',): # sorted(distutils.command.__all__): - bare_virtualenv.run(' && '.join(( - 'cd {source}', - 'python setup.py {command} -h', - )).format(command=command, source=SOURCE_DIR)) + bare_virtualenv.run( + ['python', 'setup.py', command, '-h'], cd=SOURCE_DIR) |