Coverage for biobb_dna/test/unitests/test_stiffness/test_stiffness.py: 93%
30 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-28 10:36 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-28 10:36 +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
5import platform
8class TestAvgStiffness():
9 def setup_class(self):
10 fx.test_setup(self, 'average_stiffness')
12 def teardown_class(self):
13 fx.test_teardown(self)
15 def test_averagestiffness(self):
16 returncode = average_stiffness(
17 properties=self.properties, **self.paths)
18 assert fx.not_empty(self.paths['output_csv_path'])
19 assert fx.not_empty(self.paths['output_jpg_path'])
20 assert fx.exe_success(returncode)
21 if platform.system() == 'Darwin':
22 assert fx.equal(self.paths['output_csv_path'], self.paths['ref_csv_output'])
23 assert fx.equal(self.paths['output_jpg_path'], self.paths['ref_jpg_output'])
26class TestBasePairStiffness():
27 def setup_class(self):
28 fx.test_setup(self, 'basepair_stiffness')
30 def teardown_class(self):
31 fx.test_teardown(self)
33 def test_basepairstiffness(self):
34 returncode = basepair_stiffness(
35 properties=self.properties, **self.paths)
36 assert fx.not_empty(self.paths['output_csv_path'])
37 assert fx.not_empty(self.paths['output_jpg_path'])
38 assert fx.exe_success(returncode)
39 if platform.system() == 'Darwin':
40 assert fx.equal(self.paths['output_csv_path'], self.paths['ref_csv_output'])
41 assert fx.equal(self.paths['output_jpg_path'], self.paths['ref_jpg_output'])