starfish_data_ai / tests /pytest.ini
John-Jiang's picture
init commit
5301c48
[pytest]
# This is the main section header for pytest configurations.
testpaths = .
# Tells pytest to search for tests starting from the directory where pytest.ini is located (the 'tests' directory in your case) and its subdirectories.
python_files = test_*.py
# A pattern for test discovery. Pytest will consider Python files starting with 'test_' and ending with '.py' as files that might contain tests.
# This is how it finds your 'tests/test_notebooks.py'.
python_functions = test_*
# Within the discovered Python files (like test_notebooks.py), pytest will look for functions that start with 'test_' and consider them as individual test functions.
# This is how it identifies 'test_notebook_execution' in 'test_notebooks.py'.
markers =
notebook: marks tests as notebook tests
# This defines a custom marker named 'notebook'.
# - The name before the colon ('notebook') is what you use in your code (e.g., @pytest.mark.notebook).
# - The text after the colon ('marks tests as notebook tests') is a description that appears if you run 'pytest --markers'.
# Markers help you categorize tests and can be used to selectively run or skip tests (e.g., 'pytest -m notebook').
addopts = --nbval-lax
# 'addopts' stands for "additional options". These are command-line options that pytest will automatically apply every time it runs.
# In this case, '--nbval-lax' is an option specifically for the 'nbval' plugin.
# It tells 'nbval' to run in "lax" mode:
# - Execute all cells in the notebook.
# - The test passes if all cells execute without raising any Python exceptions.
# - It does NOT compare the output of cells to any stored "expected" output. This is key for your goal of just checking if notebooks run.