Skip to content

Commit

Permalink
Parametrize test for help CLI flags (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
hackebrot authored and brettcannon committed Aug 20, 2019
1 parent 84d006d commit e7ce982
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ def call_py(*args):
yield call_py


def test_help(py):
for flag in ["--help", "-h"]:
call = py(flag)
assert not call.returncode
assert os.fspath(py.path) in call.stdout
assert sys.executable in call.stdout
@pytest.mark.parametrize("flag", ["--help", "-h"])
def test_help(py, flag):
call = py(flag)
assert not call.returncode
assert os.fspath(py.path) in call.stdout
assert sys.executable in call.stdout


def test_list(py):
Expand Down

0 comments on commit e7ce982

Please sign in to comment.