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
Is there a reason the filter keyword does not accept substitutions? I am trying to define a filter for all doctests (e.g. for comparing floating point numbers only consider up to 10 decimal values):
julia>doctest(MyPackage; doctestfilters = [(r"(\d*).(\d{1,10})\d+"=>s"\1.\2"),])
...
TypeError:in keyword argument doctestfilters, expected Vector{Regex}, got a value of type Vector{Pair{Regex, SubstitutionString{String}}}
...
passing this filter to each jldoctest individually works, but I would rather do it just once.
The text was updated successfully, but these errors were encountered:
Also, when using the filters at the individual test level, I need to use double backslash or get an error about invalid escape sequence. What works for me is:
This would probably be a good thing to implement. As a workaround, I'll point out that lookbehinds and lookaheads suffice for many (but not all) applications instead of a substitution. I wrote an example here.
Is there a reason the
filter
keyword does not accept substitutions? I am trying to define a filter for all doctests (e.g. for comparing floating point numbers only consider up to 10 decimal values):passing this filter to each
jldoctest
individually works, but I would rather do it just once.The text was updated successfully, but these errors were encountered: