• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 20318360133

17 Dec 2025 09:50PM UTC coverage: 80.295% (+0.002%) from 80.293%
20318360133

push

github

web-flow
Add [pytest].allow_empty_test_collection option to skip empty test runs (#22948)

Pytest returns exit code 5 when no tests are collected, e.g. when all
tests in a file are deselected via `-k` filtering or excluded via
markers. By default, pants treats this as a test failure.

With `allow_empty_test_collection = true`, exit code 5 is handled by
returning
[TestResult.no_tests_found_in_batch()](https://github.com/pantsbuild/pants/blob/3a34d021c/src/python/pants/core/goals/test.py#L130-L145)
instead, which skips the test run in the summary.

Fixes #22668

12 of 14 new or added lines in 3 files covered. (85.71%)

7 existing lines in 3 files now uncovered.

78498 of 97762 relevant lines covered (80.3%)

3.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.94
/src/python/pants/testutil/python_interpreter_selection.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc