test_maintainers_every_matching_stanza_applies

Tests › tests/test_owners.py

passed Passed in the packaged run.

What this test is for

Why it exists

Kernel rules: `F: dir/` covers below; `X:` excludes; `N:` is a regex over the path; every stanza that matches applies.

Verifies REQ-DDB-INDEX-007

Given

  1. —
→

When

  1. stanzas = parse_maintainers(_MAINTAINERS)
→

Then

  1. ✓ [s.title for s in stanzas] equals ["NET DRIVERS", "WIRELESS"]
  2. ✓ [s.title for s in stanzas if s.covers("drivers/net/eth.c")] equals ["NET DRIVERS"]
  3. ✓ [s.title for s in stanzas if s.covers("drivers/net/wireless/a.c")] equals ["WIRELESS"]
  4. ✓ [s.title for s in stanzas if s.covers("drivers/net/my_wifi.c")] equals [ "NET DRIVERS", "WIRELESS", ]

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

What it checks (4)

  1. assert [s.title for s in stanzas] == ["NET DRIVERS", "WIRELESS"] observes parse_maintainers via stanzas
  2. assert [s.title for s in stanzas if s.covers("drivers/net/eth.c")] == ["NET DRIVERS"] observes parse_maintainers via stanzas
  3. assert [s.title for s in stanzas if s.covers("drivers/net/wireless/a.c")] == ["WIRELESS"] observes parse_maintainers via stanzas
  4. assert [s.title for s in stanzas if s.covers("drivers/net/my_wifi.c")] == [ "NET DRIVERS", "WIRELESS", ] observes parse_maintainers via stanzas

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_maintainers_every_matching_stanza_applies→parse_maintainers

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