Coverage for biobb_dna/test/unitests/test_stiffness/test_stiffness.py: 100%

25 statements  

« prev     ^ index     » next       coverage.py v7.14.1, created at 2026-05-28 06:38 +0000

1# type: ignore 

2from biobb_common.tools import test_fixtures as fx 

3from biobb_dna.stiffness.average_stiffness import average_stiffness 

4from biobb_dna.stiffness.basepair_stiffness import basepair_stiffness 

5 

6 

7class TestAvgStiffness(): 

8 def setup_class(self): 

9 fx.test_setup(self, 'average_stiffness') 

10 

11 def teardown_class(self): 

12 fx.test_teardown(self) 

13 

14 def test_averagestiffness(self): 

15 returncode = average_stiffness( 

16 properties=self.properties, **self.paths) 

17 assert fx.not_empty(self.paths['output_csv_path']) 

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

19 assert fx.exe_success(returncode) 

20 assert fx.equal(self.paths['output_jpg_path'], self.paths['ref_jpg_output']) 

21 

22 

23class TestBasePairStiffness(): 

24 def setup_class(self): 

25 fx.test_setup(self, 'basepair_stiffness') 

26 

27 def teardown_class(self): 

28 fx.test_teardown(self) 

29 

30 def test_basepairstiffness(self): 

31 returncode = basepair_stiffness( 

32 properties=self.properties, **self.paths) 

33 assert fx.not_empty(self.paths['output_csv_path']) 

34 assert fx.not_empty(self.paths['output_jpg_path']) 

35 assert fx.exe_success(returncode) 

36 assert fx.equal(self.paths['output_jpg_path'], self.paths['ref_jpg_output'])