Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #71; use snapshot tests for selection errors
- Loading branch information
Showing
6 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +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/testing-design.html#sec-tests-files-overview | ||
# * https://testthat.r-lib.org/articles/special-files.html | ||
|
||
library(testthat) | ||
library(ipumsr) | ||
|
||
test_check("ipumsr", reporter = "location") | ||
test_check("ipumsr") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# We get informative error messages when reading NHGIS extracts | ||
|
||
Code | ||
read_nhgis(nhgis_multi_ds, file_select = 3, verbose = FALSE) | ||
Condition | ||
[1m[33mError[39m in `find_files_in()`:[22m | ||
[33m![39m Can't select files past the end. | ||
ℹ Location 3 doesn't exist. | ||
ℹ There are only 2 files. | ||
Available files: | ||
• nhgis0731_csv/nhgis0731_ds239_20185_nation.csv | ||
• nhgis0731_csv/nhgis0731_ts_nominal_state.csv | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# We get informative errors when reading shapefiles | ||
|
||
Code | ||
read_ipums_sf(nhgis_multi_shp, file_select = 4) | ||
Condition | ||
[1m[33mError[39m in `find_files_in()`:[22m | ||
[33m![39m Can't select files past the end. | ||
ℹ Location 4 doesn't exist. | ||
ℹ There are only 3 files. | ||
Available files: | ||
• nhgis0712_shape/nhgis0712_shapefile_cenpop2000_us_state_cenpop_2000.zip | ||
• nhgis0712_shape/nhgis0712_shapefile_tl2000_us_pmsa_1990.zip | ||
• nhgis0712_shape/nhgis0712_shapefile_tl2000_us_pmsa_2000.zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters