From 132bd73395033a95163080517b5a7c371cf512a2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 19 Feb 2019 18:17:38 +0100 Subject: Fix check for rdkit availability Also remove python-rdkit from the travis config as its version is too old on travis (Ubuntu trusty) --- tests/testthat/test_chent.R | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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") -- cgit v1.2.1