Skip to content

Commit 865539b

Browse files
committed
Test that pip wheel succeeds when cache dir is not writeable
1 parent a4d06ae commit 865539b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/functional/test_wheel.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ def test_pip_wheel_builds_when_no_binary_set(script, data):
120120
assert "Building wheel for simple" in str(res), str(res)
121121

122122

123+
def test_pip_wheel_readonly_cache(script, data, tmpdir):
124+
cache_dir = tmpdir / "cache"
125+
cache_dir.mkdir()
126+
os.chmod(cache_dir, 0o400) # read-only cache
127+
# Check that the wheel package is ignored
128+
res = script.pip(
129+
'wheel', '--no-index',
130+
'-f', data.find_links,
131+
'--cache-dir', cache_dir,
132+
'simple==3.0',
133+
allow_stderr_warning=True,
134+
)
135+
assert res.returncode == 0
136+
assert "caching wheels has been disabled" in str(res), str(res)
137+
138+
123139
def test_pip_wheel_builds_editable_deps(script, data):
124140
"""
125141
Test 'pip wheel' finds and builds dependencies of editables

0 commit comments

Comments
 (0)