Skip to content

Commit 0c4eafa

Browse files
committed
[tests/functional/test_cache] Fix test on Python 2.7.
1 parent b7239f5 commit 0c4eafa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/functional/test_cache.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ def test_cache_purge_too_many_args(script, wheel_cache_files):
207207
result = script.pip('cache', 'purge', 'aaa', '--verbose',
208208
expect_error=True)
209209
assert result.stdout == ''
210-
assert result.stderr == 'ERROR: Too many arguments\n'
210+
211+
# This would be `result.stderr == ...`, but Pip prints deprecation
212+
# warnings on Python 2.7, so we check if the _line_ is in stderr.
213+
assert 'ERROR: Too many arguments' in result.stderr.splitlines()
211214

212215
# Make sure nothing was deleted.
213216
for filename in wheel_cache_files:

0 commit comments

Comments
 (0)