Coverage for biobb_template/test/unitests/test_template/test_template_container.py: 48%

27 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-11-30 16:51 +0000

1import pytest 

2from biobb_common.tools import test_fixtures as fx 

3from biobb_template.template.template_container import template_container 

4 

5 

6@pytest.mark.skip(reason="skip containers when testing") 

7class TestTemplateDocker(): 

8 def setup_class(self): 

9 fx.test_setup(self, 'template_docker') 

10 

11 def teardown_class(self): 

12 fx.test_teardown(self) 

13 pass 

14 

15 def test_template_docker(self): 

16 returncode = template_container(properties=self.properties, **self.paths) 

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

18 assert fx.equal(self.paths['output_file_path'], self.paths['ref_output_file_path']) 

19 assert fx.exe_success(returncode) 

20 

21 

22@pytest.mark.skip(reason="skip containers when testing") 

23class TestTemplateSingularity(): 

24 def setup_class(self): 

25 fx.test_setup(self, 'template_singularity') 

26 

27 def teardown_class(self): 

28 fx.test_teardown(self) 

29 pass 

30 

31 def test_template_singularity(self): 

32 returncode = template_container(properties=self.properties, **self.paths) 

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

34 assert fx.equal(self.paths['output_file_path'], self.paths['ref_output_file_path']) 

35 assert fx.exe_success(returncode)