test_doxygen_any_refuses_another_configurations_output¶
Tests › tests/test_indexcache_doxygen_cache.py
What this test is for
Why it exists
THE REGRESSION THIS CLOSES SHIPPED ONCE AND WAS CAUGHT BY SOMEBODY ELSE'S TEST.
Given
output = tmp_path / "doxygen.db"output.write_bytes(b"pretend this is a doxygen database")
7 more
cache = IndexCache(tmp_path / "sidecar.db", tmp_path)narrow = cache.config_sha("INPUT = src\n", [])wide = cache.config_sha("INPUT = .\n", [])cache.doxygen_put("tree-1", output, narrow)cache.conn.execute("UPDATE doxygen_cache SET config_sha = '' WHERE tree_sha = 'tree-1'")cache.commit()cache.close()
When
- —
Then
- ✓ narrow differs from wide
- ✓ cache.doxygen_any(narrow) equals output
- ✓ cache.doxygen_any(wide) is None
- ✓ cache.doxygen_any(narrow) is None
tests/test_indexcache_doxygen_cache.py:196 · its file's page
What it checks (4)
assert narrow != wide, "two different Doxyfiles must not share a configuration hash"not attributedassert cache.doxygen_any(narrow) == output, ( "output built under THIS configuration must be available to splice into, or the " "incremental path can never engage at all" )not attributedassert cache.doxygen_any(wide) is None, ( "output built under a DIFFERENT configuration was served for splicing — this is " "#399's aliasing, and it silently produces an index carrying the old scope's rows" )not attributedassert cache.doxygen_any(narrow) is None, ( "a row with no recorded configuration was assumed compatible; an unknown " "configuration must refuse rather than be guessed at" )not attributed
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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 measured