Skip to content

Commit 9d0ea3b

Browse files
committed
Handle pyenv shims in the easy_install test
1 parent a334ad9 commit 9d0ea3b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_run_scripts.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,15 @@ def test_return_None(script_runner):
9191
# function is easy_install so we use it here.
9292

9393
try:
94-
result = script_runner.run('easy_install', '-h')
94+
path = script_runner._locate_script('easy_install')
95+
if os.path.join('.pyenv', 'shims') in path:
96+
# We have a shell wrapper from pyenv instead of real easy_install.
97+
return
9598
except FileNotFoundError:
96-
# No easy install. Just skip.
99+
# No easy_install. We skip the test.
97100
return
101+
102+
result = script_runner.run('easy_install', '-h')
98103
assert result.success
99104
assert '--verbose' in result.stdout
100105

0 commit comments

Comments
 (0)