Coverage for biobb_ml/test/unitests/test_clustering/test_k_means.py: 94%

17 statements  

« prev     ^ index     » next       coverage.py v7.5.1, created at 2024-05-07 09:39 +0000

1from biobb_common.tools import test_fixtures as fx 

2from biobb_ml.clustering.k_means import k_means 

3import platform 

4 

5 

6class TestKMeansClustering(): 

7 def setup_class(self): 

8 fx.test_setup(self, 'k_means') 

9 

10 def teardown_class(self): 

11 fx.test_teardown(self) 

12 pass 

13 

14 def test_k_means(self): 

15 k_means(properties=self.properties, **self.paths) 

16 assert fx.not_empty(self.paths['output_results_path']) 

17 assert fx.equal(self.paths['output_results_path'], self.paths['ref_output_results_path']) 

18 assert fx.not_empty(self.paths['output_model_path']) 

19 if platform.system() == 'Darwin': 

20 assert fx.equal(self.paths['output_model_path'], self.paths['ref_output_model_path']) 

21 assert fx.not_empty(self.paths['output_plot_path']) 

22 # assert fx.equal(self.paths['output_plot_path'], self.paths['ref_output_plot_path'])