diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-19 18:17:38 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-19 18:19:37 +0100 |
commit | 132bd73395033a95163080517b5a7c371cf512a2 (patch) | |
tree | 46f69d36bf47c1906f2b8876371121142d9984dd /tests/testthat | |
parent | aa80ce4f46f9ff1a2851ba9ba873a55a8f6ebc6d (diff) |
Fix check for rdkit availability
Also remove python-rdkit from the travis config as its version is too
old on travis (Ubuntu trusty)
Diffstat (limited to 'tests/testthat')
-rw-r--r-- | tests/testthat/test_chent.R | 6 |
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") |