Skip to content

Commit 37a9c00

Browse files
committed
update the example guide when the source guide changes
1 parent 837bdc5 commit 37a9c00

File tree

7 files changed

+13
-416
lines changed

7 files changed

+13
-416
lines changed

data-raw/create_test_guides.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
sourcename <- "guide_competition_1_0_source.yml"
44
targetname <- "guide_competition_1_0.yml"
5+
examplename <- "example_guide.yml"
56

67
source <- yaml::read_yaml(file.path("data-raw", sourcename))
78

@@ -27,8 +28,9 @@ write_yaml_mod <- function(x, file) {
2728
writeLines(newtxt, file)
2829
}
2930

30-
# write the source file to the testdata folder
31+
# write the source file to the testdata and inst/extdata folders
3132
write_yaml_mod(source, file.path("tests/testthat/testdata", targetname))
33+
write_yaml_mod(source, file.path("inst/extdata", examplename))
3234

3335
# Take a list s and a list of index numbers and/or names x and return
3436
# a vector of index numbers in list s correspond to the index names and or

tests/testthat/test-read.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ test_that("Function read_data works", {
6464
})
6565

6666

67-
test_that("Function read_data using guide with two plates returns two plates", {
68-
# guide <- read_guide(test_path("testdata/goodguides/guide_with_two_plates.yml"))
69-
# result <- read_data(drfile = test_path('testdata/test1.xlsx'), guide = guide)
70-
# expect_equal(length(result$platedata), 2)
71-
})
67+
# test_that("Function read_data using guide with two plates returns two plates", {
68+
# guide <- read_guide(test_path("testdata/goodguides/guide_with_two_plates.yaml"))
69+
# result <- read_data(drfile = test_path('testdata/test1.xlsx'), guide = guide)
70+
# expect_equal(length(result$platedata), 2)
71+
# })
7272

73-
test_that("Function read_data using guide split table returns single table", {
74-
# guide <- read_guide(test_path("testdata/goodguides/guide_with_split_table.yml"))
75-
# result <- read_data(drfile = test_path('testdata/test2.xlsx'), guide = guide)
76-
# expect_equal(length(result$table), 1)
77-
})
73+
# test_that("Function read_data using guide split table returns single table", {
74+
# # guide <- read_guide(test_path("testdata/goodguides/guide_with_split_table.yml"))
75+
# # result <- read_data(drfile = test_path('testdata/test2.xlsx'), guide = guide)
76+
# # expect_equal(length(result$table), 1)
77+
# })
7878

7979
test_that("Version incompatibilities yield an error.", {
8080
guide <- read_guide(test_path("testdata/erroneousguides/conflicting_min_version.yml"))

tests/testthat/testdata/goodguides/guide_competition_9_3.yaml

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

tests/testthat/testdata/goodguides/guide_with_split_table.yaml

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

tests/testthat/testdata/goodguides/guide_with_two_plates.yaml

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

tests/testthat/testdata/goodguides/guide_without_platedata.yaml

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

0 commit comments

Comments
 (0)