test(tools): test_invite_answer_wiring scans nothing in a checkout whose path contains tests/

Open Beginner friendly
#2,154 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
testing

Research direction

Start with tools/tests/test_invite_answer_wiring.py, especially the source file filtering at lines 131–136. Reproduce the failure by running the named test from a checkout path containing tests/, then apply the suggested relative path filter. Done when the test passes from that checkout and still excludes scenario/ and tests/ files.

Written by the indexing model from the issue text.

Description

backlog bug

Kind: bug (test). Found while running unit A2 of #2132 (#2147).

tools/tests/test_invite_answer_wiring.py::TheScenarioEndpointReadsTheAppliersRecord::test_the_endpoint_and_the_keep_switch
filters the source files it scans by substring on the file's absolute path, so a checkout whose own path contains
tests/ scans nothing and the test fails.

Evidence at 2cbe3211

  • tools/tests/test_invite_answer_wiring.py:131-135: for p in (ROOT / "src/runtime").rglob("*.cpp") if "scenario/" not in p.as_posix() and "tests/" not in p.as_posix(); p.as_posix() is the absolute path.
  • In a worktree whose directory name ends in tests (.../claude-main-2147-parallel-tool-tests/), others is empty:
    AssertionError: 0 not greater than 50 at :136, serially and in parallel. The same test passes in a checkout whose path has no tests/.

Not shown

  • Whether other tests filter on an absolute path (git grep -n 'as_posix()' -- tools/tests lists the candidates; the others found use relative_to(...) first).

Falsifier

The test passes in a checkout under a directory named ...-tests, with the filter taken on p.relative_to(ROOT).

Work

  1. Test first: copy the tree under a directory named x-tests and run the test; it fails.
  2. Filter on p.relative_to(ROOT / "src/runtime").as_posix() (relative path), keeping the scenario/ and tests/ exclusions.
Dominant language
C++
Stars
2
Forks
5
Avg merge
4h 20m
Merged PRs (30d)
939

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.