From d14705968a5c94d3f028470026d154dc4b74a50a Mon Sep 17 00:00:00 2001 From: Josh Carey Date: Thu, 13 Sep 2018 10:10:23 -0500 Subject: [PATCH 1/2] added ability to give multiple arguments into pytest, ex: -vvv --- mayatest/runner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mayatest/runner.py b/mayatest/runner.py index b95ae1b..a45d614 100644 --- a/mayatest/runner.py +++ b/mayatest/runner.py @@ -4,6 +4,7 @@ """ import os import sys +import shlex try: import pytest @@ -40,8 +41,8 @@ def pytest_sessionfinish(self): def main(): - pytest_args = sys.argv[2] - pytest.main([pytest_args], plugins=[PytestMayaPlugin()]) + pytest_args = shlex.split(sys.argv[2]) + pytest.main(pytest_args, plugins=[PytestMayaPlugin()]) if __name__ == '__main__': From 64f0a073b6244f696b72fe1dc45d561cc64df12f Mon Sep 17 00:00:00 2001 From: joshcareybrazen <41640389+joshcareybrazen@users.noreply.github.com> Date: Thu, 13 Sep 2018 10:12:07 -0500 Subject: [PATCH 2/2] added info about additional pytest flags --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4c4f3f3..be53a6d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ mayatest -m 2017 mayatest -m 2017 --pytest="test_sometest.py" # to only run test_func mayatest -m 2017 --pytest="test_sometest.py::test_func" +# to get verbose results, you can include pytest flags +mayatest -m 2017 --pytest="-vvv test_sometest.py" ``` For more information using pytest go to their [docs](https://docs.pytest.org/en/latest/usage.html).