-
Venkat Malladi authored302a2915
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
test_generate_software_references.py 1.04 KiB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
import pytest
import os
import utils
import yaml
test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
'/../output/softwareReport/'
@pytest.mark.singleend
def test_software_references():
assert os.path.exists(os.path.join(test_output_path, 'software_references_mqc.txt'))
@pytest.mark.singleend
def test_software_versions():
assert os.path.exists(os.path.join(test_output_path, 'software_versions_mqc.yaml'))
@pytest.mark.singleend
def test_software_versions_output():
software_versions = os.path.join(test_output_path, 'software_versions_mqc.yaml')
with open(software_versions, 'r') as stream:
data_loaded = yaml.load(stream)
assert len(data_loaded['data'].split('<dt>')) == 15
@pytest.mark.singleskip_true
def test_software_versions_output_rep():
software_versions = os.path.join(test_output_path, 'software_versions_mqc.yaml')
with open(software_versions, 'r') as stream:
data_loaded = yaml.load(stream)
assert len(data_loaded['data'].split('<dt>')) == 13