test_a_rule_with_no_owners_unsets_ownership

Tests › tests/test_owners.py

passed Passed in the packaged run.

What this test is for

Why it exists

A later ownerless rule leaves the path unowned (GitHub's documented meaning).

Verifies REQ-DDB-INDEX-007

Given

  1. —
→

When

  1. rules = parse_codeowners("* @all\n/vendor/\n")
  2. codeowners_for(rules, "vendor/lib.c")
→

Then

  1. ✓ codeowners_for(rules, "vendor/lib.c") equals ([], 2)

tests/test_owners.py:41 · its file's page

What it checks (1)

  1. assert codeowners_for(rules, "vendor/lib.c") == ([], 2) observes codeowners_for

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_a_rule_with_no_owners_unsets_ownership→parse_codeowners→codeowners_for

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.

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-INDEX-007catalogunknown