Skip to content

Commit

Permalink
Remove testthat dependency and only use native tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Syksy committed Aug 2, 2023
1 parent bc9d166 commit 4c1a481
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: curatedPCaData
Title: Curated Prostate Cancer Data
Version: 0.99.2
Date: 2023-07-26
Date: 2023-08-02
Authors@R: c(person("Teemu Daniel", "Laajala", email = "teelaa@utu.fi", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7016-7354")),
person("Jordan", "Creed", email = "jordan.h.creed@moffitt.org", role = "ctb"),
person("Christelle", "Colin Leitzinger", email = "christelle.colinleitzinger@moffitt.org", role = "ctb"),
Expand Down Expand Up @@ -29,8 +29,7 @@ Imports:
rlang,
stats,
stringr,
dplyr,
testthat
dplyr
Suggests:
BiocStyle,
knitr,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ importFrom(methods,is)
importFrom(methods,slot)
importFrom(rlang,.data)
importFrom(stats,median)
importFrom(testthat,expect_s4_class)
importFrom(utils,data)
importFrom(utils,read.csv)
importFrom(utils,read.table)
1 change: 0 additions & 1 deletion R/curatedPCaData-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#' @importFrom rlang .data
#' @importFrom stats median
#' @importFrom AnnotationHub query
#' @importFrom testthat expect_s4_class
"_PACKAGE"

# The following block is used by usethis to automatically manage
Expand Down
16 changes: 16 additions & 0 deletions tests/native_tests.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###
#
# Native 'R CMD check' tests run on the 'curatedPCaData'-package
# Any exceptions will count as a failure for 'R CMD check' run (notably, does not require 'RUnit' or 'testthat' packages for testing)
#
###

# Test retrieval of TCGA with all assays
methods::is(curatedPCaData::getPCa("tcga"), "MultiAssayExperiment")

# Test retrieval of Taylor with a pre-specified subset of assays
methods::is(curatedPCaData::getPCa("taylor", assays = c("gex.rma", "cibersort", "scores")), "MultiAssayExperiment")

# Test a data fetch that should result in an error
methods::is(try({curatedPCaData::getPCa("study_that_does_not_exist_or_is_misspelled", assays = c("foo", "bar"))}, silent=TRUE), "try-error")

3 changes: 0 additions & 3 deletions tests/testthat.R

This file was deleted.

9 changes: 0 additions & 9 deletions tests/testthat/test-getPCa.R

This file was deleted.

0 comments on commit 4c1a481

Please sign in to comment.