Skip to content

Commit

Permalink
Style code (GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhpob committed May 11, 2024
1 parent e32cdce commit 7564865
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/testthat/test-kml_to_csv.R
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
test_that("errors with kmz", {
expect_error(
kml_to_csv('some_kmz_file.kmz'),
'kmz are not supported'
kml_to_csv("some_kmz_file.kmz"),
"kmz are not supported"
)
})

test_that("creates csv", {
temp_dir <- file.path(tempdir(), 'test-kml_to_csv')
temp_dir <- file.path(tempdir(), "test-kml_to_csv")
dir.create(temp_dir)
result_of_copy <- file.copy(
system.file("extdata", "example_polygons.kml", package = "glatos"),
temp_dir
)


out_loc <- kml_to_csv(file.path(temp_dir, "example_polygons.kml"))

expect_equal(
out_loc,
file.path(temp_dir, "example_polygons.csv")
)

expect_true(
file.exists(file.path(temp_dir, "example_polygons.csv"))
)

expect_snapshot(
read.csv(
file.path(temp_dir, "example_polygons.csv")
)
)

unlink(temp_dir, recursive = T)
})

0 comments on commit 7564865

Please sign in to comment.