mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 15:02:57 +00:00
Run pytest as a module
This commit is contained in:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user