test_a_mapping_file_reads_yaml_and_csv

Tests › tests/test_wiki_imports.py

passed Passed in the packaged run.

What this test is for

Why it exists

{REQ: [tests]} YAML, or a `req,test` CSV.

Verifies REQ-DDB-WIKI-009 REQ-DDB-WIKI-016

Given

  1. yml = tmp_path / "map.yaml"
  2. yml.write_text("R-A: [Store loads, Store saves]\nR-B: store_loads\n")
2 more
  1. csv = tmp_path / "map.csv"
  2. csv.write_text("req,test\nR-A,Store loads\nR-C,flashes\n")
→

When

  1. parse_mapping(yml)
  2. parse_mapping(csv)
→

Then

  1. ✓ parse_mapping(yml) equals {"R-A": ("Store loads", "Store saves"), "R-B": ("store_loads",)}
  2. ✓ parse_mapping(csv) equals {"R-A": ("Store loads",), "R-C": ("flashes",)}

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

Build this wiki from the index · 1 of 400 steps

… 131 earlier steps

callercallercallercallerother filesother filesother filesother filesopt (line 200)optloop (line 259)loopelif (line 264)elifopt (line 202)optbuild_wiki132–133. parse_contexts → _contexts_from_lcov132_contexts_from_lcov +1 more134. _text → check_report_size134check_report_size▶ test enters135. _contexts_from_lcov → _relative135_relative136. parse_contexts → _contexts_from_data_file136_contexts_from_data_file

… 264 later steps

tests/test_wiki_imports.py:164 · its file's page

What it checks (2)

  1. assert parse_mapping(yml) == {"R-A": ("Store loads", "Store saves"), "R-B": ("store_loads",)} observes parse_mapping
  2. assert parse_mapping(csv) == {"R-A": ("Store loads",), "R-C": ("flashes",)} observes parse_mapping

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_mapping_file_reads_yaml_and_csv→parse_mapping

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_a_mapping_file_reads_yaml_and_csv · 2 checksparse_mappingREQ-DDB-WIKI-010 · measured

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-009catalogunknown
REQ-DDB-WIKI-016catalogunknown
Also reaches 1 requirement

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