11
11
12
12
13
13
@pytest .mark .network
14
- def test_debian_egg_name_workaround (script ):
14
+ def test_debian_egg_name_workaround (script_no_wheel ):
15
15
"""
16
16
We can uninstall packages installed with the pyversion removed from the
17
17
egg-info metadata directory name.
@@ -22,10 +22,13 @@ def test_debian_egg_name_workaround(script):
22
22
https://bitbucket.org/ianb/pip/issue/104/pip-uninstall-on-ubuntu-linux
23
23
24
24
"""
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
+ )
26
29
27
30
egg_info = os .path .join (
28
- script .site_packages ,
31
+ script_no_wheel .site_packages ,
29
32
"INITools-0.2-py{pyversion}.egg-info" .format (** globals ()))
30
33
31
34
# Debian only removes pyversion for global installs, not inside a venv
@@ -38,22 +41,26 @@ def test_debian_egg_name_workaround(script):
38
41
)
39
42
40
43
# 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
+ )
42
47
result .did_not_create (
43
48
mangled ,
44
49
message = "Found unexpected {mangled}" .format (** locals ())
45
50
)
46
51
47
52
# 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 )
49
54
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 )
51
56
os .renames (full_egg_info , full_mangled )
52
57
assert os .path .isdir (full_mangled )
53
58
54
59
# 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
+ )
57
64
58
65
59
66
def test_setup_py_with_dos_line_endings (script , data ):
0 commit comments