Mercurial > repos > sanbi-uwc > confil
view test/test_report.py @ 4:eaf51f9aff10 draft
planemo upload for repository https://github.com/COMBAT-TB/confil commit 9e5284a2616de5d869319f9c4436716a3f6656f8-dirty
author | sanbi-uwc |
---|---|
date | Mon, 04 Mar 2019 03:28:57 -0500 |
parents | 53a61865e86e |
children |
line wrap: on
line source
import os import pytest from confil.report import parse_report from test_runner import TEST_DATA_DIR TEST_REPORT = os.path.join(TEST_DATA_DIR, "test_file.tab") # test using a cutoff of 50% @pytest.mark.parametrize("test_input, expected", [ (type(parse_report(TEST_REPORT, 50)), list), (parse_report(TEST_REPORT, 50)[5], 'Mycobacterium'), (parse_report(TEST_REPORT, 50)[0], '55.84') ]) def test_parse_report(test_input, expected): assert test_input == expected def test_parse_report_exception(): with pytest.raises(SystemExit): parse_report(TEST_REPORT, 90)