test_a_relative_path_resolves_against_the_repo_root

Tests › tests/test_buildoptions.py

passed Passed in the packaged run.

What this test is for

Why it exists

An embedding server's working directory is not the target repository, so resolving against the process cwd would silently look for the document somewhere the operator never meant — and the loader's "file not found" would name a path the caller did not write. An absolute path is left alone.

Verifies REQ-DDB-CONFIG-008

Given

  1. args = _args()
→

When

  1. bo.apply_options( args, {"shared_key_patterns": "cfg/keys.yaml", "locks": "/etc/locks.yaml"}, Path("/repo"), )
→

Then

  1. ✓ args.shared_key_patterns equals "/repo/cfg/keys.yaml"
  2. ✓ args.locks equals "/etc/locks.yaml"

tests/test_buildoptions.py:221 · its file's page

What it checks (2)

  1. assert args.shared_key_patterns == "/repo/cfg/keys.yaml" observes _args via args
  2. assert args.locks == "/etc/locks.yaml", "an absolute path is the caller's own" observes _args via args

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_relative_path_resolves_against_the_repo_root→_args→apply_options

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-CONFIG-008catalogunknown