You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests are generated that run against the last value produced by the previous example expression. However, using @examplesIf is a bit problematic here because it uses withAutoprint() in the generated @examplesIf snippet. This function returns a slightly mutated value, wrapping the result in a list and providing extra information about whether the expression returned visibly.
Would it be possible to alter the @examplesIf snippet so it returns the result of the examples expression verbatim? If not, I can check for a list with exactly these two names and handle it as a special case, but I don't feel great about introducing heuristics into testing code.
The text was updated successfully, but these errors were encountered:
Hi! I'm reaching out because of a challenge I'm facing in
testex
, a package for in-line testing in@examples
sections.It uses a syntax that looks something like this:
Tests are generated that run against the last value produced by the previous example expression. However, using
@examplesIf
is a bit problematic here because it useswithAutoprint()
in the generated@examplesIf
snippet. This function returns a slightly mutated value, wrapping the result in a list and providing extra information about whether the expression returned visibly.Would it be possible to alter the
@examplesIf
snippet so it returns the result of the examples expression verbatim? If not, I can check for a list with exactly these two names and handle it as a special case, but I don't feel great about introducing heuristics into testing code.The text was updated successfully, but these errors were encountered: