From 61b20aa69ed8c726194a9865232ef71924fb47d3 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Mon, 4 Jul 2022 19:16:06 +0400 Subject: [PATCH] Run pytest as a module --- tests/run_tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/run_tests.py b/tests/run_tests.py index f464e17e..5a49d2b7 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -8,7 +8,7 @@ import plumbum from tests.images_hierarchy import get_test_dirs -pytest = plumbum.local["pytest"] +python3 = plumbum.local["python3"] LOGGER = logging.getLogger(__name__) @@ -19,7 +19,9 @@ def test_image(short_image_name: str, owner: str) -> None: LOGGER.info(f"Test dirs to be run: {test_dirs}") with plumbum.local.env(TEST_IMAGE=f"{owner}/{short_image_name}"): ( - pytest[ + python3[ + "-m", + "pytest", "--numprocesses", "auto", "-m", @@ -39,7 +41,7 @@ if __name__ == "__main__": required=True, help="Short image name to run test on", ) - arg_parser.add_argument("--owner", required=True, help="Owner of the image") + arg_parser.add_argument("--owner", default="jupyter", help="Owner of the image") args = arg_parser.parse_args()