Skip to main content

is_test_code_path

Function is_test_code_path 

Source
pub fn is_test_code_path(root: &Path, relative: &Path) -> bool
Expand description

Whether a project-relative path is test code. Test support (mocks, fixtures and snapshots) does not match, except below a test directory.

root is the project root. Pass relative relative to root. An absolute path also matches on the directories above the project root.