diff --git a/cdlib/test/test_nodeclustering.py b/cdlib/test/test_nodeclustering.py index f6010d6..bb04304 100644 --- a/cdlib/test/test_nodeclustering.py +++ b/cdlib/test/test_nodeclustering.py @@ -78,19 +78,25 @@ def test_comparison(self): self.assertIsInstance(coms.adjusted_rand_index(coms2).score, float) self.assertIsInstance(coms.variation_of_information(coms2).score, float) - self.assertIsInstance(coms.partition_closeness_simple(coms2).score, float) - self.assertIsInstance(coms.ecs(coms2).score, float) - self.assertIsInstance(coms.jaccard_index(coms2).score, float) - self.assertIsInstance(coms.rand_index(coms2).score, float) - self.assertIsInstance(coms.fowlkes_mallows_index(coms2).score, float) - self.assertIsInstance(coms.classification_error(coms2).score, float) - self.assertIsInstance(coms.czekanowski_index(coms2).score, float) - self.assertIsInstance(coms.dice_index(coms2).score, float) - self.assertIsInstance(coms.sorensen_index(coms2).score, float) - self.assertIsInstance(coms.rogers_tanimoto_index(coms2).score, float) - self.assertIsInstance(coms.southwood_index(coms2).score, float) - self.assertIsInstance(coms.mi(coms2).score, float) - self.assertIsInstance(coms.rmi(coms2).score, float) - self.assertIsInstance(coms.geometric_accuracy(coms2).score, float) - self.assertIsInstance(coms.overlap_quality(coms2).score, float) - self.assertIsInstance(coms.sample_expected_sim(coms2).score, float) + try: + import clusim + + self.assertIsInstance(coms.partition_closeness_simple(coms2).score, float) + self.assertIsInstance(coms.ecs(coms2).score, float) + self.assertIsInstance(coms.jaccard_index(coms2).score, float) + self.assertIsInstance(coms.rand_index(coms2).score, float) + self.assertIsInstance(coms.fowlkes_mallows_index(coms2).score, float) + self.assertIsInstance(coms.classification_error(coms2).score, float) + self.assertIsInstance(coms.czekanowski_index(coms2).score, float) + self.assertIsInstance(coms.dice_index(coms2).score, float) + self.assertIsInstance(coms.sorensen_index(coms2).score, float) + self.assertIsInstance(coms.rogers_tanimoto_index(coms2).score, float) + self.assertIsInstance(coms.southwood_index(coms2).score, float) + self.assertIsInstance(coms.mi(coms2).score, float) + self.assertIsInstance(coms.rmi(coms2).score, float) + self.assertIsInstance(coms.geometric_accuracy(coms2).score, float) + self.assertIsInstance(coms.overlap_quality(coms2).score, float) + self.assertIsInstance(coms.sample_expected_sim(coms2).score, float) + + except ImportError: + pass