Skip to content

Commit

Permalink
resolve codecov issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacko committed Oct 29, 2023
1 parent aa0c8be commit 82b7019
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/historie.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' Function returning historical admin areas of the Czech Republic, together with relevant census data as specified by parameter **era**.
#'
#' The census data structure is too complex to fully list here; most of the fields are self documenting (for Czech speakers) - and when in doubt please consult the original metadata at <https://cuni.maps.arcgis.com/home/item.html?id=c2f19cd1146747a9a8daf5b900e7747b>, or the original journal article at <https://doi.org/10.14712/23361980.2015.93>.
#' The census data structure is too complex to fully list here; most of the fields are self documenting (for Czech speakers) - and when in doubt please consult the original metadata at <https://cuni.maps.arcgis.com/home/item.html?id=c2f19cd1146747a9a8daf5b900e7747b>, or the original journal article at \doi{https://doi.org/10.14712/23361980.2015.93}.
#'
#' Of notable interest is the 1930 census, which was the last before WWII - and thus the last one to include Czechoslovak citizens of German ethnicity.
#'
Expand Down
2 changes: 1 addition & 1 deletion man/historie.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-1-historie.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ test_that("historie platí", {

test_that("chyby zadání", {

expect_error(geomorfo("bflm")) # neznámá úroveň
expect_error(geomorfo()) # povinný argument bez defaultu
expect_error(historie("bflm")) # neznámá úroveň
expect_error(historie()) # povinný argument bez defaultu

})

Expand Down
20 changes: 20 additions & 0 deletions tests/testthat/test-2-code-internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,23 @@ test_that("očekávané chyby", {
})


test_that("envir variable", {

skip_on_cran()

envir_backup <- Sys.getenv("RCZECHIA_HOME") # uložit systémovou hodnotu do zálohy

expect_true(set_home((tempdir()))) # nastavení na tempdir projde

expect_warning(set_home("bflm"), regexp = "path") # neexistiující cesta

expect_true(set_home((tempdir()))) # nastavení na tempdir projde

expect_true(unset_home()) # vysazení projde

Sys.setenv("RCZECHIA_HOME" = envir_backup) # obnovit hodnotu ze zálohy

})



0 comments on commit 82b7019

Please sign in to comment.