Mamba in base-notebook

This commit is contained in:
romainx
2021-02-27 17:29:00 +01:00
parent 67b8fb91f9
commit e8139fdf85
4 changed files with 34 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import logging
import pytest
LOGGER = logging.getLogger(__name__)
@pytest.mark.parametrize(
"package_manager, cmd", [("apt", "--version"), ("conda", "--version"), ("mamba", "--version"), ("npm", "--version")]
)
def test_package_manager(container, package_manager, cmd):
"""Test the notebook start-notebook script"""
LOGGER.info(
f"Test that the package manager {package_manager} is working properly ..."
)
c = container.run(
tty=True, command=["start.sh", "bash", "-c", f"{package_manager} {cmd}"]
)
rv = c.wait(timeout=5)
logs = c.logs(stdout=True).decode("utf-8")
assert rv == 0 or rv["StatusCode"] == 0, f"Package manager {package_manager} not working"
LOGGER.debug(logs)