Skip to content

Commit

Permalink
Try to avoid spurious test failures by setting seed
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed Nov 18, 2020
1 parent 578f6b9 commit 7c306c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ julia = "1.3"

[extras]
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ChainRulesTestUtils", "Test"]
test = ["ChainRulesTestUtils", "Random", "Test"]
2 changes: 2 additions & 0 deletions test/chainrules.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@testset "chainrules" begin
Random.seed!(1)

@testset "general" begin
for x in (1.0, -1.0, 0.0, 0.5, 10.0, -17.1, 1.5 + 0.7im)
test_scalar(erf, x)
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using SpecialFunctions
using ChainRulesTestUtils
using Random
using Test
using Base.MathConstants: γ

Expand Down

0 comments on commit 7c306c4

Please sign in to comment.