Skip to content

Commit 0cf721a

Browse files
committed
update doctests and fix matching on timing
1 parent 596ea66 commit 0cf721a

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ makedocs(;
1010
"ChainRulesTestUtils" => "index.md",
1111
"API" => "api.md",
1212
],
13-
strict=true,
1413
checkdocs=:exports,
14+
# doctest=:fix
1515
)
1616

1717
const repo = "github.com/JuliaDiff/ChainRulesTestUtils.jl.git"

docs/src/index.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
```@meta
2+
DocTestFilters = r"[0-9\.]+s"
3+
```
14
# ChainRulesTestUtils
25

36
[![CI](https://github.com/JuliaDiff/ChainRulesTestUtils.jl/workflows/CI/badge.svg?branch=main)](https://github.com/JuliaDiff/ChainRulesTestUtils.jl/actions?query=workflow%3ACI)
@@ -65,8 +68,8 @@ Keep this in mind when testing discontinuous rules for functions like [ReLU](htt
6568
julia> using ChainRulesTestUtils;
6669
6770
julia> test_frule(two2three, 3.33, -7.77);
68-
Test Summary: | Pass Total
69-
test_frule: two2three on Float64,Float64 | 6 6
71+
Test Summary: | Pass Total Time
72+
test_frule: two2three on Float64,Float64 | 6 6 2.4s
7073
7174
```
7275

@@ -77,8 +80,8 @@ The call will test the `rrule` for function `f` at the point `x`, and similarly
7780

7881
```jldoctest ex
7982
julia> test_rrule(two2three, 3.33, -7.77);
80-
Test Summary: | Pass Total
81-
test_rrule: two2three on Float64,Float64 | 9 9
83+
Test Summary: | Pass Total Time
84+
test_rrule: two2three on Float64,Float64 | 10 10 0.9s
8285
8386
```
8487

@@ -105,13 +108,13 @@ with the `frule` and `rrule` defined with the help of `@scalar_rule` macro
105108
call.
106109
```jldoctest ex
107110
julia> test_scalar(relu, 0.5);
108-
Test Summary: | Pass Total
109-
test_scalar: relu at 0.5 | 11 11
111+
Test Summary: | Pass Total Time
112+
test_scalar: relu at 0.5 | 12 12 1.0s
110113
111114
112115
julia> test_scalar(relu, -0.5);
113-
Test Summary: | Pass Total
114-
test_scalar: relu at -0.5 | 11 11
116+
Test Summary: | Pass Total Time
117+
test_scalar: relu at -0.5 | 12 12 0.0s
115118
116119
```
117120

0 commit comments

Comments
 (0)