diff options
author | Erik Skultety <eskultet@redhat.com> | 2023-03-27 12:03:05 +0200 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2023-04-28 10:05:23 +0000 |
commit | feeda0c0c46d4f6a9df1fcc10fa92ada4e9f6b9b (patch) | |
tree | d00746b01611136d737b68b9ef29dd979b889144 /tox.ini | |
parent | 23383c2aaf62c4acaff7ba4b947e1d15ccfe8d50 (diff) | |
download | libvirt-ci-feeda0c0c46d4f6a9df1fcc10fa92ada4e9f6b9b.zip libvirt-ci-feeda0c0c46d4f6a9df1fcc10fa92ada4e9f6b9b.tar.gz libvirt-ci-feeda0c0c46d4f6a9df1fcc10fa92ada4e9f6b9b.tar.bz2 |
tox: Allow running with custom pytest options with {posargs}
Tox allows passing custom command arguments with {posargs}. This is
useful to us because we have our own custom pytest option
'--regenerate-output' which we need to be able to pass to pytest.
The way this works is you run tox as:
$ tox -- <--custom_option>
and tox will substiture <--custom_option> everywhere where {posargs} is
mentioned. That would be a problem if we ever allow running multiple
tox environments with custom options, but in that case limiting the
environments to be run like the following would again solve the issue:
$ tox -e lint -- --color never
$ tox -e py38 -- --regenerate-output
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ deps = pytest ansible ansible-runner -rrequirements.txt -commands = pytest +commands = pytest {posargs} [testenv:lint] description = Run linter |