Better tests directory structure (#2231)

This commit is contained in:
Ayaz Salikhov
2025-02-21 17:46:43 +00:00
committed by GitHub
parent 80f4426b8e
commit 165bbc1e71
67 changed files with 174 additions and 148 deletions

View 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