Skip to content

Commit

Permalink
Run pytest as a module
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Jul 4, 2022
1 parent 5583aba commit 61b20aa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from tests.images_hierarchy import get_test_dirs

pytest = plumbum.local["pytest"]
python3 = plumbum.local["python3"]

LOGGER = logging.getLogger(__name__)

Expand All @@ -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",
Expand All @@ -39,7 +41,7 @@ def test_image(short_image_name: str, owner: str) -> None:
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()

Expand Down

0 comments on commit 61b20aa

Please sign in to comment.