Skip to content

Commit

Permalink
removed some encoding tests
Browse files Browse the repository at this point in the history
encoding is much harder than I imagined and some tests were failing on
windows only. the test that was preserved is enough to check if the
'encoding' parameter is actually having any effect on the result, but
does not assume what that result will be, since it apparently depends on
the OS you're using.
  • Loading branch information
dhersz committed Aug 10, 2021
1 parent 379329d commit 7e187dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: gtfsio
Title: Read and Write General Transit Feed Specification (GTFS) Files
Version: 0.1.2.9005
Version: 0.1.2.9006
Authors@R:
c(person(given = "Daniel",
family = "Herszenhut",
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"codeRepository": "https://github.com/r-transit/gtfsio",
"issueTracker": "https://github.com/r-transit/gtfsio/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.2.9005",
"version": "0.1.2.9006",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -123,7 +123,7 @@
"sameAs": "https://CRAN.R-project.org/package=zip"
}
],
"fileSize": "151537.087KB",
"fileSize": "151536.835KB",
"keywords": [
"r",
"gtfs"
Expand Down
4 changes: 0 additions & 4 deletions inst/tinytest/test_import_gtfs.R
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,7 @@ gtfs$agency <- rbind(
tmpf <- tempfile("import_gtfs_test", fileext = ".zip")
export_gtfs(gtfs, tmpf)

gtfs_unknown <- import_gtfs(tmpf, files = "agency", encoding = "unknown")
gtfs_utf8 <- import_gtfs(tmpf, files = "agency", encoding = "UTF-8")
gtfs_latin1 <- import_gtfs(tmpf, files = "agency", encoding = "Latin-1")

# 'unknown' guesses 'UTF-8', which is the correct, and 'Latin-1' is wrong
expect_identical(gtfs_utf8$agency, gtfs$agency)
expect_identical(gtfs_utf8$agency, gtfs_unknown$agency)
expect_false(identical(gtfs_utf8$agency, gtfs_latin1$agency))

0 comments on commit 7e187dd

Please sign in to comment.