test_a_legitimately_empty_root_is_not_flagged¶
Tests › tests/test_extra_input_patterns.py
What this test is for
Why it exists
A guard that fires on the benign case is worse than no guard. An empty directory contributes zero files whatever the patterns say, so blaming FILE_PATTERNS for it would be a false alarm — and would train the reader to ignore the message in the case that matters.
Given
doxyfile = _doxyfile(tmp_path, "FILE_PATTERNS = *.h")(tmp_path / "empty").mkdir()
When
ts.roots_matching_no_file_pattern(doxyfile, tmp_path, ["empty"], None, tmp_path)ts.roots_matching_no_file_pattern(doxyfile, tmp_path, ["absent"], None, tmp_path)
Then
- ✓ ts.roots_matching_no_file_pattern(doxyfile, tmp_path, ["empty"], None, tmp_path) equals []
- ✓ ts.roots_matching_no_file_pattern(doxyfile, tmp_path, ["absent"], None, tmp_path) equals []
tests/test_extra_input_patterns.py:137 · its file's page
What it checks (2)
assert ts.roots_matching_no_file_pattern(doxyfile, tmp_path, ["empty"], None, tmp_path) == []observesroots_matching_no_file_patternassert ts.roots_matching_no_file_pattern(doxyfile, tmp_path, ["absent"], None, tmp_path) == []observesroots_matching_no_file_pattern
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-INDEX-001 measured