diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index 46810ff5064..09d204ecb0a 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -1081,14 +1081,14 @@ def test_install_package_conflict_prefix_and_user(script, data): ) -def test_install_package_that_emits_unicode(script, data): +def test_install_package_that_emits_unicode(script_no_wheel, data): """ Install a package with a setup.py that emits UTF-8 output and then fails. Refs https://github.com/pypa/pip/issues/326 """ to_install = data.packages.joinpath("BrokenEmitsUTF8") - result = script.pip( + result = script_no_wheel.pip( 'install', to_install, expect_error=True, expect_temp=True, quiet=True, ) assert ( @@ -1648,17 +1648,22 @@ def test_installing_scripts_on_path_does_not_print_warning(script): assert "--no-warn-script-location" not in result.stderr -def test_installed_files_recorded_in_deterministic_order(script, data): +def test_installed_files_recorded_in_deterministic_order( + script_no_wheel, data +): """ Ensure that we record the files installed by a package in a deterministic order, to make installs reproducible. """ to_install = data.packages.joinpath("FSPkg") - result = script.pip('install', to_install) - fspkg_folder = script.site_packages / 'fspkg' + # allow_stderr_warning for https://github.com/pypa/pip/issues/8559 + result = script_no_wheel.pip( + 'install', to_install, allow_stderr_warning=True + ) + fspkg_folder = script_no_wheel.site_packages / 'fspkg' egg_info = 'FSPkg-0.1.dev0-py{pyversion}.egg-info'.format(**globals()) installed_files_path = ( - script.site_packages / egg_info / 'installed-files.txt' + script_no_wheel.site_packages / egg_info / 'installed-files.txt' ) result.did_create(fspkg_folder) result.did_create(installed_files_path) diff --git a/tests/functional/test_install_compat.py b/tests/functional/test_install_compat.py index a5a0df65218..202426d3037 100644 --- a/tests/functional/test_install_compat.py +++ b/tests/functional/test_install_compat.py @@ -11,7 +11,7 @@ @pytest.mark.network -def test_debian_egg_name_workaround(script): +def test_debian_egg_name_workaround(script_no_wheel): """ We can uninstall packages installed with the pyversion removed from the egg-info metadata directory name. @@ -22,10 +22,13 @@ def test_debian_egg_name_workaround(script): https://bitbucket.org/ianb/pip/issue/104/pip-uninstall-on-ubuntu-linux """ - result = script.pip('install', 'INITools==0.2') + # allow_stderr_warning for https://github.com/pypa/pip/issues/8559 + result = script_no_wheel.pip( + 'install', 'INITools==0.2', allow_stderr_warning=True + ) egg_info = os.path.join( - script.site_packages, + script_no_wheel.site_packages, "INITools-0.2-py{pyversion}.egg-info".format(**globals())) # Debian only removes pyversion for global installs, not inside a venv @@ -38,22 +41,26 @@ def test_debian_egg_name_workaround(script): ) # The Debian no-pyversion version of the .egg-info - mangled = os.path.join(script.site_packages, "INITools-0.2.egg-info") + mangled = os.path.join( + script_no_wheel.site_packages, "INITools-0.2.egg-info" + ) result.did_not_create( mangled, message="Found unexpected {mangled}".format(**locals()) ) # Simulate a Debian install by copying the .egg-info to their name for it - full_egg_info = os.path.join(script.base_path, egg_info) + full_egg_info = os.path.join(script_no_wheel.base_path, egg_info) assert os.path.isdir(full_egg_info) - full_mangled = os.path.join(script.base_path, mangled) + full_mangled = os.path.join(script_no_wheel.base_path, mangled) os.renames(full_egg_info, full_mangled) assert os.path.isdir(full_mangled) # Try the uninstall and verify that everything is removed. - result2 = script.pip("uninstall", "INITools", "-y") - assert_all_changes(result, result2, [script.venv / 'build', 'cache']) + result2 = script_no_wheel.pip("uninstall", "INITools", "-y") + assert_all_changes( + result, result2, [script_no_wheel.venv / 'build', 'cache'] + ) def test_setup_py_with_dos_line_endings(script, data):