Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Water
dataRetrieval
Commits
f6ff13c1
Commit
f6ff13c1
authored
Dec 22, 2021
by
Laura A DeCicco
Browse files
Add more tests
parent
634b3eb1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/testthat/tests_general.R
View file @
f6ff13c1
...
...
@@ -104,6 +104,8 @@ test_that("General NWIS retrievals working", {
endDate
=
"2015-06-18"
,
service
=
"dv"
)
expect_equal
(
2
,
nrow
(
multi_huc
))
})
...
...
tests/testthat/tests_imports.R
View file @
f6ff13c1
...
...
@@ -176,6 +176,14 @@ test_that("External importWaterML1 test", {
expect_equal
(
chi_iv
$
dateTime
[
1
],
as.POSIXct
(
"2014-05-01T00:00"
,
format
=
"%Y-%m-%dT%H:%M"
,
tz
=
"America/Chicago"
))
expect_equal
(
chi_iv
$
dateTime
[
nrow
(
chi_iv
)],
as.POSIXct
(
"2014-05-01T12:00"
,
format
=
"%Y-%m-%dT%H:%M"
,
tz
=
"America/Chicago"
))
# Time over daylight saving switch:
tzURL
<-
constructNWISURL
(
"04027000"
,
c
(
"00300"
,
"63680"
),
"2011-11-05"
,
"2011-11-07"
,
"uv"
)
tzIssue
<-
importWaterML1
(
tzURL
,
asDateTime
=
TRUE
,
tz
=
"America/Chicago"
)
expect_false
(
any
(
duplicated
(
tzIssue
$
dateTime
)))
})
# test_that("no data val replacement works", {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment