From bb9fe3ddff7ad8ac1669fe5ea50d342e87e3d5cf Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Sat, 20 Apr 2024 10:46:53 -0400 Subject: [PATCH] Clean up `conftest.py` --- conftest.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/conftest.py b/conftest.py index f3e69911..6bebd679 100644 --- a/conftest.py +++ b/conftest.py @@ -1,10 +1,7 @@ -from pathlib import Path - import hy # For the side-effect of allowing import of Hy programs. - import pytest -def pytest_collect_file(parent, path): - if path.basename.startswith('test_') and path.ext == ".hy": - return pytest.Module.from_parent(parent, path=Path(path)) +def pytest_collect_file(file_path, parent): + if file_path.name.startswith('test_') and file_path.suffix == '.hy': + return pytest.Module.from_parent(parent, path = file_path)