comparison test/test_report.py @ 3:53a61865e86e draft

planemo upload for repository https://github.com/COMBAT-TB/confil commit cb48efaef286f70c94607cb583a61bb9e3d71604
author sanbi-uwc
date Wed, 27 Feb 2019 06:20:05 -0500
parents
children
comparison
equal deleted inserted replaced
2:ca3c6f955c3e 3:53a61865e86e
1 import os
2
3 import pytest
4
5 from confil.report import parse_report
6 from test_runner import TEST_DATA_DIR
7
8 TEST_REPORT = os.path.join(TEST_DATA_DIR, "test_file.tab")
9
10 # test using a cutoff of 50%
11
12
13 @pytest.mark.parametrize("test_input, expected", [
14 (type(parse_report(TEST_REPORT, 50)), list),
15 (parse_report(TEST_REPORT, 50)[5], 'Mycobacterium'),
16 (parse_report(TEST_REPORT, 50)[0], '55.84')
17 ])
18 def test_parse_report(test_input, expected):
19 assert test_input == expected
20
21
22 def test_parse_report_exception():
23 with pytest.raises(SystemExit):
24 parse_report(TEST_REPORT, 90)