mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 13:32:56 +00:00
Run tests on all children images
This commit is contained in:
33
tests/base-notebook/test_package_managers.py
Normal file
33
tests/base-notebook/test_package_managers.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
import logging
|
||||
import pytest # type: ignore
|
||||
|
||||
from conftest import TrackedContainer
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"package_manager, version_arg",
|
||||
[
|
||||
("apt", "--version"),
|
||||
("conda", "--version"),
|
||||
("mamba", "--version"),
|
||||
("npm", "--version"),
|
||||
("pip", "--version"),
|
||||
],
|
||||
)
|
||||
def test_package_manager(
|
||||
container: TrackedContainer, package_manager: str, version_arg: tuple[str, ...]
|
||||
) -> None:
|
||||
"""Test the notebook start-notebook script"""
|
||||
LOGGER.info(
|
||||
f"Test that the package manager {package_manager} is working properly ..."
|
||||
)
|
||||
container.run_and_wait(
|
||||
timeout=5,
|
||||
tty=True,
|
||||
command=["start.sh", "bash", "-c", f"{package_manager} {version_arg}"],
|
||||
)
|
Reference in New Issue
Block a user