summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-10-13 15:10:03 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-10-13 15:10:03 +0200
commit898d598bcbb022ac767e0105e868798130f2c74c (patch)
tree8a079442d27df08ed8ee7659f508f62e544f8b32 /tests
parent6937e41d317b953d8246203814500166dbe89470 (diff)
Adapt to changes in webchem
Unfortunately, tests only pass sometimes, it seems PubChem is not always responding
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test_pai.R8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/testthat/test_pai.R b/tests/testthat/test_pai.R
index de1f235..368876e 100644
--- a/tests/testthat/test_pai.R
+++ b/tests/testthat/test_pai.R
@@ -4,9 +4,9 @@ require(testthat)
context("Generation of pai objects")
-test_that("a pai object is correctly generated from an ambiguous name, with warning", {
- expect_warning(glyphosate <- pai$new("glyphosate", chyaml = FALSE))
- expect_warning(pai$new("benzalkonium chloride", chyaml = FALSE))
+test_that("a pai object is correctly generated from an ambiguous name", {
+ glyphosate <- pai$new("glyphosate", chyaml = FALSE)
+ expect_message(pai$new("benzalkonium chloride", chyaml = FALSE), "did not give results")
expect_equivalent(glyphosate$alanwood$cas, "1071-83-6")
expect_equivalent(glyphosate$alanwood$formula, "C3H8NO5P")
@@ -15,7 +15,7 @@ test_that("a pai object is correctly generated from an ambiguous name, with warn
ik = "XDDAORKBJWWYJS-UHFFFAOYSA-N"
attr(ik, "source") <- c("alanwood", "pubchem")
expect_equal(glyphosate$inchikey, ik)
- expect_equivalent(round(glyphosate$mw, 2), 169.07)
+ expect_equivalent(round(glyphosate$mw, 2), 169.07)
smiles <- "C(C(=O)O)NCP(=O)(O)O"
expect_equal(glyphosate$smiles[["PubChem_Canonical"]], smiles)
})

Contact - Imprint