Skip to content

Commit

Permalink
Fixed devtools::test() failing if context() isn't defined
Browse files Browse the repository at this point in the history
  • Loading branch information
andzajan committed Mar 19, 2019
1 parent beb29ec commit 301e164
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 4 deletions.
3 changes: 3 additions & 0 deletions tests/testthat/test.avfrag.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
context ("checking averaging functionality")

test_that("checking averaging functionality", {
print ("\n")
print("########################################################")
print("## Checking averaging ##")
print("########################################################")
Expand Down
5 changes: 4 additions & 1 deletion tests/testthat/test.combine-annotations.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test_that("checking lcms based functions", {
context ("checking combine annotations based functions")

test_that("checking combine annotations based functions", {
print ("\n")
print("########################################################")
print("## Checking LCMS based class and functions ##")
print("########################################################")
Expand Down
7 changes: 5 additions & 2 deletions tests/testthat/test.create-msp.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
test_that("checking lcms based functions", {
context ("checking msp based functions")

test_that("checking msp based functions", {
print ("\n")
print("########################################################")
print("## Checking LCMS based class and functions ##")
print("## Checking msp based class and functions ##")
print("########################################################")

msmsPths <- list.files(system.file("extdata", "lcms", "mzML", package="msPurityData"), full.names = TRUE, pattern = "MSMS")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test.db.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
context ("checking database functions")

test_that("checking database functions", {
print ("\n")
print("########################################################")
print("## Checking database handles lcms and msms ##")
print("########################################################")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test.dims.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
context ("Checking file list function")

test_that("Checking file list function", {
print ("\n")
print("########################################################")
print("## Checking file list function ##")
print("########################################################")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test.filter-frag-spectra.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
context ("checking filterFragSpectra purityA")

test_that("checking filterFragSpectra purityA", {
print ("\n")
print("########################################################")
print("## Checking functions for filtering frag spectra ##")
print("########################################################")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test.flagremove.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
context ("checking flag and remove peaks")

test_that("checking flag and remove peaks", {
print ("\n")
print("########################################################")
print("## checking flag and remove (lc-ms) ##")
print("########################################################")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test.lcms.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
context ("checking lcms based functions")

test_that("checking lcms based functions", {
print ("\n")
print("########################################################")
print("## Checking LCMS based class and functions ##")
print("########################################################")
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test.pcalc.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

context ("checking pcalc functions")

test_that("checking pcalc functions", {
print ("\n")
print("########################################################")
print("## Checking pcalc functions ##")
print("########################################################")
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test.sm.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
context ("checking spectral matching functions with averaging")

# test_that("checking spectral matching functions (massbank)", {
# too time consuming to run on bioconductor
# print("########################################################")
Expand Down Expand Up @@ -74,6 +76,7 @@


test_that("checking spectral matching functions with averaging", {
print ("\n")
print("########################################################")
print("## Spectral matching functions ##")
print("########################################################")
Expand Down

0 comments on commit 301e164

Please sign in to comment.