fix tests

This commit is contained in:
2026-03-29 18:23:07 -07:00
parent d94e92666d
commit 2b17a2594f
5 changed files with 27 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
from pathlib import Path
import pytest
_DIR = Path(__file__).parent
def pytest_collect_file(parent, file_path):
"""Collect all non-private .py files in this directory as test modules.
Allows test files to be named after their source module (e.g. acf_2d.py)
rather than requiring a test_ prefix.
"""
if (
file_path.parent == _DIR
and file_path.suffix == ".py"
and not file_path.name.startswith("_")
and file_path.name != "conftest.py"
):
return pytest.Module.from_parent(parent, path=file_path)