From 35b2381341b7322bc43a046fc7381bd7ea2cd06c Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Thu, 4 Apr 2019 09:21:11 -0400 Subject: [PATCH] Add positional arguments to pytest calls in tox.ini This change adds a posargs argument to the call to pytest that is used when invoking unit tests for individual Python versions. This allows developers to specify which tests or test suites they want to invoke. For example, use the following to run the unit test suites related to the GetAttributeList payloads for Python 2.7: tox -r -e py27 -- -k TestGetAttributeList Developers can still use tox to run the entire test suite, like before: tox -r -e py27 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5b1e21f..ce3d330 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - coverage run --source=kmip/ --omit=kmip/demos/*,kmip/tests/* -m pytest --strict kmip/tests/unit + coverage run --source=kmip/ --omit=kmip/demos/*,kmip/tests/* -m pytest --strict kmip/tests/unit {posargs} coverage report -m coverage html