Skip to content

Commit a5bc54a

Browse files
committed
prepare for CRAN release. Many tests now fail with devtools::check() because of issues with usethis::proj_get(). They have been moved to integration tests
1 parent c0713fb commit a5bc54a

File tree

10 files changed

+7
-54
lines changed

10 files changed

+7
-54
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: testthis
22
Type: Package
33
Title: Utils and 'RStudio' Addins to Make Testing Even More Fun
4-
Version: 1.0.1.9000
4+
Version: 1.0.2
55
Authors@R: person("Stefan", "Fleck", email = "[email protected]", role = c("aut", "cre"))
66
Maintainer: Stefan Fleck <[email protected]>
77
Description:

R/test_subdir.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
#'
4545
#' @export
4646
test_subdir <- function(subdir, ...){
47-
48-
browser()
4947
testthat::test_dir(file.path(
5048
usethis::proj_get(), testthat::test_path(), subdir
5149
))

R/use_test_subdir.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@ use_test_subdir <- function(
4343
assert_that(is.scalar(make_tester))
4444
assert_that(is.scalar(is.logical(make_tester) || is.character(make_tester)))
4545

46-
4746
# Process arguments
4847
path <- make.names(path)
49-
base_path <- usethis::proj_get()
50-
5148

5249
# Logic
5350
usethis::use_directory(
@@ -78,7 +75,6 @@ use_test_subdir <- function(
7875
#' to create a tester function.
7976
#' @param ignore Logical. Add `tester_path` to \file{.Rbuildignore}?
8077
#' @param tester_path \R script file in which to store the tester functions
81-
#' @template base_path
8278
#'
8379
#' @return `TRUE` on success (invisibly).
8480
#' @export

R/use_testdata.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#' @inheritParams base::readRDS
1111
#' @template overwrite
1212
#' @inheritParams usethis::use_directory
13-
#' @template base_path
1413
#' @return `use_testdata()` returns `TRUE` if object was successfully saved.
1514
#'
1615
#' @section Side effects:
@@ -36,12 +35,12 @@ use_testdata <- function(
3635

3736

3837
# Find and prepare test_data directory
39-
base_path <- usethis::proj_get()
38+
pkg <- usethis::proj_get()
4039
tdata_dir <- file.path("tests", "testthat", "testdata")
4140
if(!is.null(subdir)){
4241
tdata_dir <- file.path(tdata_dir, subdir)
4342
}
44-
save_path <- file.path(base_path, tdata_dir)
43+
save_path <- file.path(pkg, tdata_dir)
4544

4645
show_dir_creation_message <- !dir.exists(save_path)
4746
usethis::use_directory(tdata_dir, ignore = FALSE)

cran-comments.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ This is a new release, so there are no reverse dependencies.
1414

1515
## Notes
1616

17-
* One function of the script uses `:::` for a piece of code where it needs to
18-
mock a devtools function. 'testthis' integrates tightly with devtools and
19-
this was the cleanest way that I could find to solve that particular problem.
20-
21-
* Most functions in this package modify the file system or are designed to be
22-
run interactively. That is why most code examples in the documentation are
23-
wrapped in `\dontrun{}`
17+
Most functions in this package modify the file system or are designed to be
18+
run interactively. That is why most code examples in the documentation are
19+
wrapped in `\dontrun{}`.
2420

2521
---

man-roxygen/base_path.R

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
File renamed without changes.

tests/testthat/test_Test_coverage.R

Lines changed: 0 additions & 35 deletions
This file was deleted.

vignettes/testthis.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The test_coverage summary for a package may look like this (+ marks function for
170170
which tests exist):
171171

172172
```{r}
173-
get_test_coverage(base_path = system.file(package = 'testthis'))
173+
get_test_coverage()
174174
```
175175

176176

0 commit comments

Comments
 (0)