Skip to content

Commit 21ccda5

Browse files
committed
update all tests to 'num_cores = 1' for #1
1 parent e3b2a8f commit 21ccda5

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: githist
22
Title: Code analyses traced along the 'git' history of a package
3-
Version: 0.1.0.030
3+
Version: 0.1.0.031
44
Authors@R:
55
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/githist",
99
"issueTracker": "https://github.com/ropensci-review-tools/githist/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.1.0.030",
11+
"version": "0.1.0.031",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

tests/testthat/test-dashboard.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pkg <- system.file ("extdata", "testpkg.zip", package = "githist")
22
flist <- unzip (pkg, exdir = fs::path_temp ())
33
path <- fs::path_dir (flist [1])
44

5-
res0 <- githist (path)
5+
res0 <- githist (path, num_cores = 1L)
66

77
test_that ("dashboard input errors", {
88

tests/testthat/test-testpkg.R

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ test_that ("testpkg and input errors", {
66
flist <- unzip (pkg, exdir = fs::path_temp ())
77
path <- fs::path_dir (flist [1])
88

9-
expect_error (githist (path, step_size = 1:2))
10-
expect_error (githist (path, step_size = "1"))
9+
expect_error (githist (path, step_size = 1:2, num_cores = 1L))
10+
expect_error (githist (path, step_size = "1", num_cores = 1L))
1111

12-
res <- githist (path)
12+
res <- githist (path, num_cores = 1L)
13+
fs::dir_delete (path)
1314

1415
expect_type (res, "list")
1516
expect_length (res, 3L)
@@ -22,17 +23,17 @@ test_that ("githist parameters", {
2223
flist <- unzip (pkg, exdir = fs::path_temp ())
2324
path <- fs::path_dir (flist [1])
2425

25-
res0 <- githist (path)
26+
res0 <- githist (path, num_cores = 1L)
2627
n0 <- vapply (res0, nrow, integer (1L))
2728
fs::dir_delete (path)
2829

2930
flist <- unzip (pkg, exdir = fs::path_temp ())
30-
res1 <- githist (path, n = 2L)
31+
res1 <- githist (path, n = 2L, num_cores = 1L)
3132
n1 <- vapply (res1, nrow, integer (1L))
3233
fs::dir_delete (path)
3334

3435
flist <- unzip (pkg, exdir = fs::path_temp ())
35-
res2 <- githist (path, n = 2L, step_size = 2L)
36+
res2 <- githist (path, n = 2L, step_size = 2L, num_cores = 1L)
3637
n2 <- vapply (res2, nrow, integer (1L))
3738
fs::dir_delete (path)
3839

0 commit comments

Comments
 (0)