Skip to content

The test capture reads Test.Pass.data and Test.Fail.data, so a Julia upgrade degrades every check to a 1/0 indicator silently #119

Description

@sotashimozono

ext/PinaxTestExt.jl:279-295 recovers the real got/want/tol by pattern-matching the isapprox expression that Test already evaluated. The comment says it plainly: "Measured on Julia 1.12."

The shape it depends on:

  • Test.Pass.data must be an Expr
  • Test.Fail.data must be a String that Meta.parses

Both are wrapped in guards that return nothing, and _check_from (src/testset.jl:504-512) turns nothing into got=1.0, want=1.0, tol=0.5 -- the generic indicator.

The failure mode

If a future Julia changes either shape, every check in every report becomes a 1/0 indicator with margin 0.0. The suite still passes, the report still renders, the verdict is still PASS, and the delta/tol that is the entire product is gone -- with no warning, and no way for a reader to tell it apart from "this suite has no isapprox tests".

Project.toml declares julia = "1.12" with no upper bound.

Why this is the wrong dependency to take silently

These are undocumented internals of the Test stdlib, taken by a rendering package. That is defensible only if the failure is loud.

Fix

Assert the shape once, at capture-install time, and @warn (or error) if it does not hold -- instead of degrading every check individually and invisibly. Consider an upper bound on the julia compat until the shape is verified on the next minor.

Reported by review; the mechanism was read, the degradation was not executed against a modified Julia.

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 workingsilent-failureWrong output that looks self-consistent; no signal to the readertest-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