diff --git a/tests/testthat/test-bibtex_reader.R b/tests/testthat/test-bibtex_reader.R index 3724b41..77500d5 100644 --- a/tests/testthat/test-bibtex_reader.R +++ b/tests/testthat/test-bibtex_reader.R @@ -1,6 +1,8 @@ context("bibtex_reader") test_that("bibtex_reader: works", { + skip_on_cran() + z <- system.file('extdata/crossref.bib', package = "handlr") x <- bibtex_reader(z) diff --git a/tests/testthat/test-bibtex_writer.R b/tests/testthat/test-bibtex_writer.R index 62342f1..7363d9e 100644 --- a/tests/testthat/test-bibtex_writer.R +++ b/tests/testthat/test-bibtex_writer.R @@ -1,6 +1,8 @@ context("bibtex_writer") test_that("bibtex_writer: works", { + skip_on_cran() + z <- system.file('extdata/citeproc.json', package = "handlr") tmp <- citeproc_reader(z) x <- bibtex_writer(z = tmp) @@ -10,6 +12,8 @@ test_that("bibtex_writer: works", { }) test_that("bibtex_writer: write from citeproc json", { + skip_on_cran() + z <- system.file('extdata/citeproc.json', package = "handlr") tmp <- citeproc_reader(z) x <- bibtex_writer(z = tmp) @@ -17,6 +21,8 @@ test_that("bibtex_writer: write from citeproc json", { }) test_that("bibtex_writer: output gives back same as input from bibtex_reader", { + skip_on_cran() + z <- system.file('extdata/bibtex2.bib', package = "handlr") w <- bibtex_reader(z) bw_out <- bibtex_writer(w) diff --git a/tests/testthat/test-citeproc_reader.R b/tests/testthat/test-citeproc_reader.R index 4feccc2..54164f6 100644 --- a/tests/testthat/test-citeproc_reader.R +++ b/tests/testthat/test-citeproc_reader.R @@ -1,6 +1,8 @@ context("citeproc_reader") test_that("citeproc_reader: works", { + skip_on_cran() + z <- system.file('extdata/citeproc.json', package = "handlr") x <- citeproc_reader(z) diff --git a/tests/testthat/test-client.R b/tests/testthat/test-client.R index 8a2cc64..786b06a 100644 --- a/tests/testthat/test-client.R +++ b/tests/testthat/test-client.R @@ -1,5 +1,7 @@ context("HandlrClient") +skip_on_cran() + test_that("HandlrClient class: after initializing, but before reading", { expect_is(HandlrClient, "R6ClassGenerator") expect_is(HandlrClient$new, "function") diff --git a/tests/testthat/test-client_guesses_format.R b/tests/testthat/test-client_guesses_format.R index 259f394..d7ce765 100644 --- a/tests/testthat/test-client_guesses_format.R +++ b/tests/testthat/test-client_guesses_format.R @@ -1,5 +1,7 @@ context("HandlrClient: guesses format") +skip_on_cran() + test_that("guesses correctly: citeproc", { z <- system.file("extdata/citeproc.json", package = "handlr") x <- HandlrClient$new(z) diff --git a/tests/testthat/test-codemeta_reader.R b/tests/testthat/test-codemeta_reader.R index 77b420c..c67d1dd 100644 --- a/tests/testthat/test-codemeta_reader.R +++ b/tests/testthat/test-codemeta_reader.R @@ -3,6 +3,8 @@ context("codemeta_reader") z <- system.file('extdata/codemeta.json', package = "handlr") test_that("codemeta_reader: works", { + skip_on_cran() + x <- codemeta_reader(z) expect_is(codemeta_reader, "function") @@ -16,6 +18,8 @@ test_that("codemeta_reader: works", { }) test_that("codemeta_reader: read from string", { + skip_on_cran() + str <- paste0(readLines(z), collapse = "") x <- codemeta_reader(str) diff --git a/tests/testthat/test-codemeta_writer.R b/tests/testthat/test-codemeta_writer.R index 845008b..6a833fb 100644 --- a/tests/testthat/test-codemeta_writer.R +++ b/tests/testthat/test-codemeta_writer.R @@ -1,6 +1,8 @@ context("codemeta_writer") test_that("codemeta_writer: works", { + skip_on_cran() + z <- system.file('extdata/codemeta.json', package = "handlr") tmp <- codemeta_reader(z) x <- codemeta_writer(tmp) @@ -11,6 +13,8 @@ test_that("codemeta_writer: works", { }) test_that("codemeta_writer: write from citeproc json", { + skip_on_cran() + z <- system.file('extdata/citeproc.json', package = "handlr") tmp <- citeproc_reader(z) x <- codemeta_writer(z = tmp) @@ -20,6 +24,8 @@ test_that("codemeta_writer: write from citeproc json", { test_that("codemeta_writer: output gives back same as input from codemeta_reader", { + skip_on_cran() + z <- system.file('extdata/codemeta.json', package = "handlr") w <- codemeta_reader(z) bw_out <- codemeta_writer(w) diff --git a/tests/testthat/test-handl-class.R b/tests/testthat/test-handl-class.R index 7223439..3b17d4e 100644 --- a/tests/testthat/test-handl-class.R +++ b/tests/testthat/test-handl-class.R @@ -1,6 +1,8 @@ context("handl-class") test_that("handl class", { + skip_on_cran() + z <- system.file('extdata/crossref.bib', package = "handlr") x <- bibtex_reader(z) diff --git a/tests/testthat/test-handl_to_df.R b/tests/testthat/test-handl_to_df.R index 28af4bc..0f39ddc 100644 --- a/tests/testthat/test-handl_to_df.R +++ b/tests/testthat/test-handl_to_df.R @@ -1,6 +1,8 @@ context("handl_to_df") -# handl_to_df(handl_empty()) + test_that("handl_to_df: works", { + skip_on_cran() + z <- system.file('extdata/crossref.bib', package = "handlr") x <- bibtex_reader(z) aa <- handl_to_df(x) @@ -21,6 +23,8 @@ test_that("handl_to_df: works", { }) test_that("handl_to_df: works with many citations", { + skip_on_cran() + z <- system.file('extdata/bib-many.bib', package = "handlr") res2 <- bibtex_reader(x = z) aa <- handl_to_df(res2) @@ -33,6 +37,8 @@ test_that("handl_to_df: works with many citations", { }) test_that("handl_to_df: works with HandlrClient", { + skip_on_cran() + z <- system.file('extdata/bib-many.bib', package = "handlr") x <- HandlrClient$new(x = z) diff --git a/tests/testthat/test-ris_reader.R b/tests/testthat/test-ris_reader.R index c78fd35..9489c5e 100644 --- a/tests/testthat/test-ris_reader.R +++ b/tests/testthat/test-ris_reader.R @@ -1,6 +1,8 @@ context("ris_reader") test_that("ris_reader: works", { + skip_on_cran() + z <- system.file("extdata/crossref.ris", package = "handlr") x <- ris_reader(z) @@ -25,6 +27,8 @@ test_that("ris_reader: works", { }) test_that("ris_reader: many inputs", { + skip_on_cran() + z <- system.file("extdata/multiple-eg.ris", package = "handlr") x <- ris_reader(z) diff --git a/tests/testthat/test-ris_writer.R b/tests/testthat/test-ris_writer.R index 338260b..82fe396 100644 --- a/tests/testthat/test-ris_writer.R +++ b/tests/testthat/test-ris_writer.R @@ -1,6 +1,8 @@ context("ris_writer") test_that("ris_writer: works", { + skip_on_cran() + z <- system.file("extdata/crossref.ris", package = "handlr") tmp <- ris_reader(z) x <- ris_writer(tmp) @@ -10,6 +12,8 @@ test_that("ris_writer: works", { }) test_that("ris_writer: write from citeproc json", { + skip_on_cran() + z <- system.file("extdata/citeproc.json", package = "handlr") tmp <- citeproc_reader(z) x <- ris_writer(tmp) @@ -17,6 +21,8 @@ test_that("ris_writer: write from citeproc json", { }) test_that("ris_writer: output gives back same as input from ris_reader", { + skip_on_cran() + z <- system.file("extdata/peerj.ris", package = "handlr") w <- ris_reader(z) bw_out <- ris_writer(w)