зеркало из https://github.com/microsoft/wpa.git
chore: add tests
This commit is contained in:
Родитель
246e9120e4
Коммит
e027057d1f
|
@ -67,5 +67,7 @@ Suggests:
|
|||
glue,
|
||||
flexdashboard,
|
||||
lmtest,
|
||||
sandwich
|
||||
sandwich,
|
||||
testthat (>= 3.0.0)
|
||||
Language: en-US
|
||||
Config/testthat/edition: 3
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# This file is part of the standard setup for testthat.
|
||||
# It is recommended that you do not modify it.
|
||||
#
|
||||
# Where should you do additional test configuration?
|
||||
# Learn more about the roles of various files in:
|
||||
# * https://r-pkgs.org/tests.html
|
||||
# * https://testthat.r-lib.org/reference/test_package.html#special-files
|
||||
|
||||
library(testthat)
|
||||
library(wpa)
|
||||
|
||||
test_check("wpa")
|
|
@ -0,0 +1,10 @@
|
|||
test_that(
|
||||
desc = "Test workpatterns outputs",
|
||||
code = {
|
||||
out <- workpatterns_classify(em_data, signals = "IM", return = "data")
|
||||
expect_equal(
|
||||
object = nrow(out),
|
||||
expected = nrow(em_data)
|
||||
)
|
||||
}
|
||||
)
|
Загрузка…
Ссылка в новой задаче