Seems assert_file_exists don't recognize correct extensions like csv.gz.
Steps to reproduce:
x <- tempfile(fileext = ".csv.gz")
# "/tmp/RtmpVfYkVJ/file3aafe5eafe385.csv.gz"
write("", x)
assert_file_exists(x, extension = "csv.gz")
Error: Assertion on 'x' failed: File extension must be in {'csv.gz'}.
Reason is regex in the checkFileExtension which keep only last matched pattern.
> checkmate:::checkFileExtension("test.csv.gz", "csv.gz")
[1] "File extension must be in {'csv.gz'}"
> checkmate:::checkFileExtension("test.csv.gz", "gz")
[1] TRUE
Seems
assert_file_exists
don't recognize correct extensions likecsv.gz
.Steps to reproduce:
Reason is regex in the
checkFileExtension
which keep only last matched pattern.