Chandra Ilindra
03/14/2025, 5:12 AMMarvin
03/14/2025, 5:13 AMpytest
on the tests/public
directory, and it's only collecting tests from two files: test_flow_calls.py
and test_flow_crashes.py
. There could be several reasons for this behavior:
1. Test Discovery Rules: By default, pytest
discovers tests in files that match the pattern test_*.py
or *_test.py
. Ensure that all your test files follow this naming convention.
2. Configuration Files: Check if there's a pytest.ini
, tox.ini
, or setup.cfg
file in your project that might be affecting test discovery. These files can specify test paths, patterns, and other configurations.
3. Test Markers or Filters: If you're using any markers or filters (e.g., -k
, -m
), they might limit which tests are being collected.
4. Import Errors: If there are import errors in other test files, pytest
might skip them. Run pytest
with the -ra
flag to display a summary of skipped and failed tests, which might provide more insight.
5. Directory Structure: Ensure that the directory structure is correct and that pytest
can access all test files.
To diagnose further, you might want to run pytest
with the -v
(verbose) flag to get more detailed output, or --collect-only
to see which tests are being collected and why some might be skipped.
If you need more specific guidance, let me know the structure of your test directory or any configurations you might have in place.