File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,5 @@ library(testthat)
55if (identical(Sys.getenv(" TRAVIS" ), " true" ) || identical(Sys.getenv(" R_EXPENSIVE_TEST_OK" ), " true" )) {
66 test_check(" mlrMBO" )
77} else {
8- set.seed(1 )
98 test_check(" mlrMBO" , filter = " ((mbo_rf)|(mbo_km))" )
109}
Original file line number Diff line number Diff line change 11# We want to run on cran with a fixed seed (1) so that tests will not fail stochastically
22# For local testing + Travis we want to detect and be able reproduce these so we sample a seed
3- if (! is.na(Sys.getenv(" NOT_CRAN" , unset = NA ))) {
4- set.seed(1 )
5- } else {
6- seed.val = sample(1 : 10 , size = 1 )
3+ if (identical(Sys.getenv(" TRAVIS" ), " true" ) || identical(Sys.getenv(" R_EXPENSIVE_TEST_OK" ), " true" )) {
4+ seed.val = sample(1 : 100 , size = 1 )
75 set.seed(seed.val )
86 # Only on Travis logs we want to see the used seed
97 if (identical(Sys.getenv(" TRAVIS" ), " true" )) {
108 catf(" Run test with seed: %i" , seed.val )
119 }
10+ } else {
11+ set.seed(1 )
1212}
1313
1414configureMlr(show.learner.output = FALSE )
You can’t perform that action at this time.
0 commit comments