Skip to content

Commit

Permalink
allow overriding functional arguments with posargs
Browse files Browse the repository at this point in the history
It is useful to run a single test from the command line with, for instance:

  tox -e ansibledevel-functional -- -k 'test_command_init_role[docker]' test/functional/test_command.py

The test/functional/ pytest argument is made a default used when there
are no posargs instead of being hardcoded and always used. If all
pytest invocations include test/functional/ there is no way for the
user to restrict the tests being run to a single file.

Signed-off-by: singuliere <[email protected]>
  • Loading branch information
singuliere committed Feb 8, 2019
1 parent 6502649 commit 6ce1be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extras =
vagrant
commands =
unit: pytest test/unit/ --cov={toxinidir}/molecule/ --no-cov-on-fail {posargs}
functional: pytest test/functional/ {posargs}
functional: pytest {posargs:test/functional/}
lint: flake8
lint: yamllint -s test/ molecule/

Expand Down

0 comments on commit 6ce1be2

Please sign in to comment.