aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test_chent.R6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/testthat/test_chent.R b/tests/testthat/test_chent.R
index 28d120e..1fa0852 100644
--- a/tests/testthat/test_chent.R
+++ b/tests/testthat/test_chent.R
@@ -1,8 +1,14 @@
context("Generation of chent objects")
+# Check if we can use RDKit
+skip_if_no_rdkit <- function() {
+ if (!chents:::rdkit_available()) skip("RDKit is not available via PythonInR")
+}
+
oct <- chent$new("1-octanol", smiles = "CCCCCCCCO", pubchem = FALSE, chyaml = FALSE)
test_that("We can generate a chent object from SMILES using RDKit", {
+ skip_if_no_rdkit()
expect_equivalent(round(oct$mw, 2), 130.23)
expect_equal(names(oct$identifier), "X1.octanol")
expect_equal(oct$smiles[["user"]], "CCCCCCCCO")

Contact - Imprint