Skip to content

Commit 42c2872

Browse files
committed
Removed context() and library(bayesplot) in tests
1 parent 98d7023 commit 42c2872

28 files changed

Lines changed: 2 additions & 86 deletions

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ Suggests:
5656
scales,
5757
shinystan (>= 2.3.0),
5858
survival,
59-
testthat (>= 2.0.0),
59+
testthat (>= 3.0.0),
6060
vdiffr (>= 1.0.2)
6161
RoxygenNote: 7.3.3
6262
VignetteBuilder: knitr
6363
Encoding: UTF-8
6464
Roxygen: list(markdown = TRUE)
65+
Config/testthat/edition: 3

tests/testthat/test-aesthetics.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
library(bayesplot)
2-
context("Aesthetics")
3-
4-
51
# color scheme stuff ------------------------------------------------------
62

73
prepare_colors_for_test <- function(scheme) {

tests/testthat/test-available_ppc.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
library(bayesplot)
2-
context("available_mcmc and available_ppc")
3-
4-
51
test_that("available_mcmc works", {
62
a <- available_mcmc()
73
expect_s3_class(a, "bayesplot_function_list")

tests/testthat/test-bayesplot_grid.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
library(bayesplot)
2-
context("bayesplot_grid")
3-
41
skip_if_not_installed("gridExtra")
52

63
y <- example_y_data()

tests/testthat/test-convenience-functions.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
library(bayesplot)
21
library(ggplot2)
3-
context("Convenience functions (for ggplot objects)")
4-
52

63
# abline_01, vline_ and hline_ ------------------------------------------
74
test_that("abline_01 returns the correct object", {

tests/testthat/test-example-draws.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
library(bayesplot)
2-
context("Example draws")
3-
41
test_that("example_mcmc_draws throws correct errors", {
52
expect_error(example_mcmc_draws(chains = 5), "chains <= 4")
63
expect_error(example_mcmc_draws(chains = 0), "chains >= 1")

tests/testthat/test-extractors.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
library(bayesplot)
2-
context("Extractors")
3-
41
if (requireNamespace("rstanarm", quietly = TRUE)) {
52
ITER <- 1000
63
CHAINS <- 3

tests/testthat/test-helpers-mcmc.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
library(bayesplot)
2-
context("MCMC: misc. functions")
3-
41
source(test_path("data-for-mcmc-tests.R"))
52

6-
7-
83
# melt_mcmc ----------------------------------------------------------------
94
test_that("melt_mcmc does not convert integer parameter names to integers #162", {
105
mat2 <- mat[, 1:2]

tests/testthat/test-helpers-ppc.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
library(bayesplot)
2-
context("PPC: misc. functions")
3-
41
source(test_path("data-for-ppc-tests.R"))
52
source(test_path("data-for-mcmc-tests.R"))
63

tests/testthat/test-helpers-shared.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
library(bayesplot)
2-
context("Shared: misc. functions")
3-
41
# suggested packages ------------------------------------------------------
52
test_that("suggested_package throws correct errors", {
63
expect_error(suggested_package("NOPACKAGE"),

0 commit comments

Comments
 (0)