mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-14 05:22:56 +00:00
Add a way to easily test units
This commit is contained in:
@@ -7,15 +7,21 @@ import pytest
|
||||
import os
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
@pytest.mark.parametrize("test_file, output_format,", [
|
||||
("notebook_math", "pdf"), ("notebook_math", "html"),
|
||||
("notebook_svg", "pdf"), ("notebook_svg", "html"),
|
||||
])
|
||||
@pytest.mark.parametrize(
|
||||
"test_file, output_format",
|
||||
[
|
||||
("notebook_math", "pdf"),
|
||||
("notebook_math", "html"),
|
||||
("notebook_svg", "pdf"),
|
||||
("notebook_svg", "html")
|
||||
]
|
||||
)
|
||||
def test_nbconvert(container, test_file, output_format):
|
||||
"""Check if nbconvert is able to convert a notebook file"""
|
||||
host_data_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data")
|
||||
host_data_dir = os.path.join(THIS_DIR, "data")
|
||||
cont_data_dir = "/home/jovyan/data"
|
||||
output_dir = "/tmp"
|
||||
LOGGER.info(f"Test that the example notebook {test_file} can be converted to {output_format.upper()} ...")
|
||||
|
Reference in New Issue
Block a user