Skip to content

tests: rename test classes so pytest collects them - #577

Open
ehanrsha wants to merge 1 commit into
MIT-LCP:mainfrom
ehanrsha:fix/test-processing-collection
Open

ehanrsha wants to merge 1 commit into
MIT-LCP:mainfrom
ehanrsha:fix/test-processing-collection

Conversation

@ehanrsha

Copy link
Copy Markdown

Running pytest tests/test_processing.py -v prints collected 0 items, even though the file contains 8 test methods.

Cause: the classes are named test_processing and test_qrs. pytest's default python_classes = "Test*" only collects classes whose names start with Test (unless they subclass unittest.TestCase, which these don't). So the whole file is silently skipped, both locally and in CI. That means the resampling, peak-finding, GQRS, and XQRS tests have not been running.

Fix: rename the classes to TestProcessing and TestQrs. No test logic changed.

Before:

pytest tests/test_processing.py -v
collected 0 items

After:

pytest tests/test_processing.py -v
collected 8 items
8 passed in 4.27s

Tested on Windows 11, Python 3.14.3, pytest 9.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant