1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 13:01:59 +02:00

unit test

This commit is contained in:
2023-07-10 18:30:26 +02:00
parent 1b499bf012
commit dab20c09f6
5 changed files with 4 additions and 4 deletions

View File

@ -131,7 +131,7 @@ for (l in AMR:::LANGUAGES_SUPPORTED[-1]) {
expect_error(mo_gramstain("Escherichia coli", language = "UNKNOWN"))
fullnames <- microorganisms$fullname[which(microorganisms$fullname %unlike% "unknown|coagulase|Fungi|[(]class[)]|[{]")]
to_dutch <- suppressWarnings(mo_name(fullnames, language = "nl", keep_synonyms = TRUE))
back_to_english <- suppressWarnings(mo_name(dutch, language = NULL, keep_synonyms = TRUE))
back_to_english <- suppressWarnings(mo_name(to_dutch, language = NULL, keep_synonyms = TRUE))
diffs <- paste0('"', fullnames[fullnames != back_to_english], '"', collapse = ", ")
expect_identical(fullnames, back_to_english, info = diffs) # gigantic test - will run ALL names