Skip to content

doctest filter keyword does not accept substitution #2360

@cmichelenstrofer

Description

@cmichelenstrofer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions