test_excluded_file_does_not_move_the_hash

Tests › tests/test_treescan_pruning.py

passed Passed in the packaged run.

What this test is for

Why it exists

A file appearing inside an excluded subtree does not move the hash.

Given

  1. repo = tmp_path / "repo"
  2. repo.mkdir()
4 more
  1. _make_scan_tree(repo)
  2. cache_path = tmp_path / "c.idxcache"
  3. before = _tree_sha(repo, cache_path)
  4. _write_scan_file(repo / "vendored" / "late.c", "int late;\n")
→

When

  1. —
→

Then

  1. ✓ _tree_sha(repo, cache_path) equals before

tests/test_treescan_pruning.py:240 · its file's page

What it checks (1)

  1. assert _tree_sha(repo, cache_path) == before observes _tree_sha

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

test_excluded_file_does_not_move_the_hash→_make_scan_tree→_tree_sha→_write_scan_file

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.

test_excluded_file_does_not_move_the_hash · 1 checks_tree_shaenumerate_treeREQ-DDB-INDEX-002 · measured_tree_shaenumerate_treerel_keyREQ-DDB-PIPE-003 · measured
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.