Skip to content

Commit c21ab73

Browse files
committed
Move github_files tests to other unit test to avoid gh-queries happening at the same time
1 parent 0005955 commit c21ab73

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

tests/testthat/test-github_files.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
test_that("github_files works", {
22

3-
files <- github_files(owner = "RajLabMSSM",
4-
repo = "Fine_Mapping_Shiny",
5-
query = ".md$",
6-
download = TRUE)
7-
testthat::expect_true(methods::is(files, "data.table"))
8-
testthat::expect_true(nrow(files)>=1)
3+
# files <- github_files(owner = "RajLabMSSM",
4+
# repo = "Fine_Mapping_Shiny",
5+
# query = ".md$",
6+
# download = TRUE)
7+
# testthat::expect_true(methods::is(files, "data.table"))
8+
# testthat::expect_true(nrow(files)>=1)
99
})
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
test_that("github_pages_files works", {
22

3+
files <- github_files(owner = "RajLabMSSM",
4+
repo = "Fine_Mapping_Shiny",
5+
query = ".md$",
6+
download = TRUE)
7+
testthat::expect_true(methods::is(files, "data.table"))
8+
testthat::expect_true(nrow(files)>=1)
9+
310
#### Test echolocatoR #####
411
dt <- github_pages_files(owner = "RajLabMSSM",
5-
repo = "echolocatoR")
6-
testthat::expect_gte(nrow(dt), 20)
12+
repo = "echolocatoR",
13+
query = "\\.html$")
14+
testthat::expect_gte(nrow(dt), 30)
715

816
#### Test Fine_Mapping repo ####
917
links_df <- github_pages_files(owner = "RajLabMSSM",
1018
repo = "Fine_Mapping",
1119
branch = "master")
12-
testthat::expect_gte(nrow(links_df), 220)
20+
testthat::expect_gte(nrow(links_df), 4000)
1321
})

tests/testthat/test-r_repos_downloads.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ test_that("r_repos_downloads works", {
1616
p <- "echolocatoR"
1717
dt <- echogithub::description_extract(ref = p,
1818
fields = NULL,
19-
as_datatable = TRUE) |>
20-
data.table::setnames("Package","package")
19+
as_datatable = TRUE)
2120
pkgs3 <- r_repos_downloads(pkgs = dt)
2221
run_tests(pkgs=dt,
2322
pkgs_out = pkgs3)

0 commit comments

Comments
 (0)