Skip to content

Commit f41e69a

Browse files
committed
fix random false positives while we're at it
1 parent 4fa2e5f commit f41e69a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/testthat.R

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ if (report_diffs || build_table) {
1212
message("Spinning up an independent R session with plotly's master branch installed")
1313
Rserve::Rserve(args = "--vanilla --RS-enable-remote")
1414
conn <- RSconnect()
15+
# ensure the seed is the same for randomized tests
16+
set.seed(1)
17+
RSeval(conn, "set.seed(1)")
1518
# we don't make assumptions about ggplot2 versioning,
1619
# but it is _strongly_ recommended to use the CRAN version (of ggplot2)
1720
RSeval(conn, "devtools::install_github('ropensci/plotly')")

tests/testthat/test-ggplot-jitter.R

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ expect_traces <- function(gg, n_traces, name) {
1515
list(traces = has_data, layout = L$layout)
1616
}
1717

18-
set.seed(1001)
1918
p <- ggplot(mpg, aes(cyl, hwy)) + geom_jitter()
2019

2120
test_that("geom_jitter is working", {

0 commit comments

Comments
 (0)