Skip to content

Commit 7dfe724

Browse files
committed
Some tests really need wheel to be absent
1 parent 3faf175 commit 7dfe724

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

tests/functional/test_install.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,14 +1081,14 @@ def test_install_package_conflict_prefix_and_user(script, data):
10811081
)
10821082

10831083

1084-
def test_install_package_that_emits_unicode(script, data):
1084+
def test_install_package_that_emits_unicode(script_no_wheel, data):
10851085
"""
10861086
Install a package with a setup.py that emits UTF-8 output and then fails.
10871087
10881088
Refs https://github.com/pypa/pip/issues/326
10891089
"""
10901090
to_install = data.packages.joinpath("BrokenEmitsUTF8")
1091-
result = script.pip(
1091+
result = script_no_wheel.pip(
10921092
'install', to_install, expect_error=True, expect_temp=True, quiet=True,
10931093
)
10941094
assert (
@@ -1648,17 +1648,22 @@ def test_installing_scripts_on_path_does_not_print_warning(script):
16481648
assert "--no-warn-script-location" not in result.stderr
16491649

16501650

1651-
def test_installed_files_recorded_in_deterministic_order(script, data):
1651+
def test_installed_files_recorded_in_deterministic_order(
1652+
script_no_wheel, data
1653+
):
16521654
"""
16531655
Ensure that we record the files installed by a package in a deterministic
16541656
order, to make installs reproducible.
16551657
"""
16561658
to_install = data.packages.joinpath("FSPkg")
1657-
result = script.pip('install', to_install)
1658-
fspkg_folder = script.site_packages / 'fspkg'
1659+
# allow_stderr_warning for https://github.com/pypa/pip/issues/8559
1660+
result = script_no_wheel.pip(
1661+
'install', to_install, allow_stderr_warning=True
1662+
)
1663+
fspkg_folder = script_no_wheel.site_packages / 'fspkg'
16591664
egg_info = 'FSPkg-0.1.dev0-py{pyversion}.egg-info'.format(**globals())
16601665
installed_files_path = (
1661-
script.site_packages / egg_info / 'installed-files.txt'
1666+
script_no_wheel.site_packages / egg_info / 'installed-files.txt'
16621667
)
16631668
result.did_create(fspkg_folder)
16641669
result.did_create(installed_files_path)

tests/functional/test_install_compat.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@pytest.mark.network
14-
def test_debian_egg_name_workaround(script):
14+
def test_debian_egg_name_workaround(script_no_wheel):
1515
"""
1616
We can uninstall packages installed with the pyversion removed from the
1717
egg-info metadata directory name.
@@ -22,10 +22,13 @@ def test_debian_egg_name_workaround(script):
2222
https://bitbucket.org/ianb/pip/issue/104/pip-uninstall-on-ubuntu-linux
2323
2424
"""
25-
result = script.pip('install', 'INITools==0.2')
25+
# allow_stderr_warning for https://github.com/pypa/pip/issues/8559
26+
result = script_no_wheel.pip(
27+
'install', 'INITools==0.2', allow_stderr_warning=True
28+
)
2629

2730
egg_info = os.path.join(
28-
script.site_packages,
31+
script_no_wheel.site_packages,
2932
"INITools-0.2-py{pyversion}.egg-info".format(**globals()))
3033

3134
# Debian only removes pyversion for global installs, not inside a venv
@@ -38,22 +41,26 @@ def test_debian_egg_name_workaround(script):
3841
)
3942

4043
# The Debian no-pyversion version of the .egg-info
41-
mangled = os.path.join(script.site_packages, "INITools-0.2.egg-info")
44+
mangled = os.path.join(
45+
script_no_wheel.site_packages, "INITools-0.2.egg-info"
46+
)
4247
result.did_not_create(
4348
mangled,
4449
message="Found unexpected {mangled}".format(**locals())
4550
)
4651

4752
# Simulate a Debian install by copying the .egg-info to their name for it
48-
full_egg_info = os.path.join(script.base_path, egg_info)
53+
full_egg_info = os.path.join(script_no_wheel.base_path, egg_info)
4954
assert os.path.isdir(full_egg_info)
50-
full_mangled = os.path.join(script.base_path, mangled)
55+
full_mangled = os.path.join(script_no_wheel.base_path, mangled)
5156
os.renames(full_egg_info, full_mangled)
5257
assert os.path.isdir(full_mangled)
5358

5459
# Try the uninstall and verify that everything is removed.
55-
result2 = script.pip("uninstall", "INITools", "-y")
56-
assert_all_changes(result, result2, [script.venv / 'build', 'cache'])
60+
result2 = script_no_wheel.pip("uninstall", "INITools", "-y")
61+
assert_all_changes(
62+
result, result2, [script_no_wheel.venv / 'build', 'cache']
63+
)
5764

5865

5966
def test_setup_py_with_dos_line_endings(script, data):

0 commit comments

Comments
 (0)