mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-09 19:12:59 +00:00
Better tests directory structure (#2231)
This commit is contained in:
25
tests/image_specific_tests/scipy-notebook/test_cython.py
Normal file
25
tests/image_specific_tests/scipy-notebook/test_cython.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
from pathlib import Path
|
||||
|
||||
from tests.utils.tracked_container import TrackedContainer
|
||||
|
||||
THIS_DIR = Path(__file__).parent.resolve()
|
||||
|
||||
|
||||
def test_cython(container: TrackedContainer) -> None:
|
||||
host_data_dir = THIS_DIR / "data/cython"
|
||||
cont_data_dir = "/home/jovyan/data"
|
||||
|
||||
logs = container.run_and_wait(
|
||||
timeout=10,
|
||||
volumes={str(host_data_dir): {"bind": cont_data_dir, "mode": "ro"}},
|
||||
tty=True,
|
||||
command=[
|
||||
"bash",
|
||||
"-c",
|
||||
# We copy our data to a temporary folder to be able to modify the directory
|
||||
f"cp -r {cont_data_dir}/ /tmp/test/ && cd /tmp/test && python3 setup.py build_ext",
|
||||
],
|
||||
)
|
||||
assert "building 'helloworld' extension" in logs
|
Reference in New Issue
Block a user