Skip to content

Commit

Permalink
Parametrize script runner with indirect=True (#30)
Browse files Browse the repository at this point in the history
This change is needed for pytest 5.4.0

c.f. pytest-dev/pytest#5712
  • Loading branch information
kvas-it committed Mar 16, 2020
2 parents 3ee9419 + c946ede commit 3a0a610
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytest_console_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def pytest_generate_tests(metafunc):
mode = mark_mode or option_mode or config_mode or 'inprocess'

if mode in {'inprocess', 'subprocess'}:
metafunc.parametrize('script_launch_mode', [mode])
metafunc.parametrize('script_launch_mode', [mode], indirect=True)
elif mode == 'both':
metafunc.parametrize('script_launch_mode', ['inprocess', 'subprocess'])
metafunc.parametrize('script_launch_mode', ['inprocess', 'subprocess'], indirect=True)
else:
raise ValueError('Invalid script launch mode: {}'.format(mode))

Expand Down

0 comments on commit 3a0a610

Please sign in to comment.