mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 04:20:53 +01:00
(v3.0.1.9100) Fix unit test on wrapped warnings; taxonomy build never touches the version number
- test-data-microorganisms.R: warnings are wrapped to the console width, so the expected patterns now allow a line break between words (failed on GitHub Actions since v3.0.1.9097) - reproduction_of_microorganisms_CLAUDE.md, step 4: the agent never changes the version number or date, the human sets them when merging Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1a7f01bfb0
commit
6d54d581b2
4 files changed
+11
-8
No files matched your search
@@ -181,15 +181,16 @@ test_that("MO codes: codes of earlier releases are translated, never guessed", {
|
||||
mo_name_without_suffix(translated$fullname)
|
||||
)
|
||||
|
||||
# warnings are wrapped to the console width, so the patterns allow a line break between words
|
||||
# regression: in October 2026, the code of Trichophyton (F_TRCHP, v3.0.1) was guessed as Talaromyces
|
||||
expect_warning(x <- as.mo("F_TRCHP_RBRM", info = FALSE), "earlier AMR package version")
|
||||
expect_warning(x <- as.mo("F_TRCHP_RBRM", info = FALSE), "earlier AMR package\\s+version")
|
||||
expect_identical(mo_name(x, language = NULL), "Trichophyton rubrum")
|
||||
expect_identical(suppressWarnings(mo_genus("F_TRCHP", language = NULL)), "Trichophyton")
|
||||
|
||||
# codes from before v2.0.0 and unknown codes are never guessed (decision by Matthijs S. Berends, 3 October 2026)
|
||||
expect_warning(x <- as.mo("B_ESCH_COL", info = FALSE), "not supported")
|
||||
expect_warning(x <- as.mo("B_ESCH_COL", info = FALSE), "not\\s+supported")
|
||||
expect_true(is.na(x))
|
||||
expect_warning(x <- as.mo(c("B_ESCHR_COL", "B_ESCHR_COLI"), info = FALSE), "unknown MO code")
|
||||
expect_warning(x <- as.mo(c("B_ESCHR_COL", "B_ESCHR_COLI"), info = FALSE), "unknown\\s+MO\\s+code")
|
||||
expect_identical(as.character(x), c(NA, "B_ESCHR_COLI"))
|
||||
|
||||
# regression: until October 2026, a MycoBank target that was not in the data set replaced a valid GBIF target by NA
|
||||
|
||||
Reference in new issue
Block a user