Stream: helpdesk (published)

Topic: ✔ Doctest filter not working


view this post on Zulip Lilith Hafner (Feb 25 2024 at 14:59):

Here's a snippet from a recent CI failure:

```jldoctest; filters=r"\d\d?\d?\.\d{3} [μmn]?s( \(.*\))?|0 ns|<0.001 ns"
julia> @b 1
0.713 ns

julia> @b 1.0
1.135 ns

julia> @b 1.0 map=Returns(nothing)
0 ns
```

Subexpression:

@b 1.0 map=Returns(nothing)

Evaluated output:

<0.001 ns

Expected output:

0 ns


  diff =
    Warning: Diff output requires color.
    0 <0.001 ns

Why is the filter not working?

view this post on Zulip Sundar R (Feb 25 2024 at 15:30):

Is it just a typo/copy paste error or does the first line actually say filters instead of filter in your doctest? If the latter, that might be the issue.

view this post on Zulip Lilith Hafner (Feb 25 2024 at 15:30):

I knew it was something obvious, thanks!

view this post on Zulip Notification Bot (Feb 25 2024 at 16:09):

Lilith Hafner has marked this topic as resolved.


Last updated: Dec 28 2024 at 04:38 UTC