Skip to content

Four smaller defects in the test-report path: magic-triple indicator, in-place Check mutation, silent depth flattening, last-writer-wins sweep band #130

Description

@sotashimozono

Grouped because each is small and they share an area.

1. The 1/0 indicator sentinel is detected heuristically. src/testset.jl:605 excludes a check from _worst_margin iff kind === :abs && tol == 0.5 && want == 1.0. A hand-written @expect got=1.0 want=1.0 tol=0.5 -- legal @benchmark input -- is silently excluded too. The indicator should be a field on Check, not a magic triple.

2. _place_check! mutates a shared Check in place. :1284 assigns chk.id on the caller object. On the direct (non-dump) render path these are the live PinaxTestSet own Checks, so rendering the same tree twice renumbers them from a fresh counter. Harmless today; the fold is not idempotent by construction on any input it does not own.

3. Testset nesting deeper than two levels is flattened without notice. _enter_section! (src/document.jl:587) pushes into pg.sections and _exit_section! (:615) unconditionally clears CTX.section, so a grandchild @testset becomes a sibling of its parent. docs/src/test2pinax.md:53 says "each nested @testset a section" and never mentions a depth limit.

4. _push_sweep_figures! is last-writer-wins on the reference line. src/testset.jl:1000-1005 overwrites wantv[i], bandlo[i], bandhi[i] per legend series inside the for lg in legs loop. With two or more series having different want at the same x tick, only the last series reference and tolerance band is drawn -- for all series.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtest-reportThe Test -> Pinax bridge (experimental)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions