Skip to main content

is_test_file

Function is_test_file 

Source
pub fn is_test_file(path: &str) -> bool
Expand description

Return true if path identifies a test file by Python convention.

Delegates to a CorpusMatcher built from CORPUS_PROFILE.test_file_globs:

  • test_*.py / *_test.py match by base-name glob (pytest conventions), OR
  • conftest.py matches exactly (pytest fixtures / configuration), OR
  • tests as a bare literal matches any path segment (e.g. src/tests/foo.py).