diff options
author | Frederick Muriuki Muriithi | 2022-04-20 13:26:20 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-04-20 13:26:20 +0300 |
commit | 5897b6ec7fbd1226cd68a292122cc494e46f6829 (patch) | |
tree | eb7cf72b8da2546aded142e684b9b84ac02a23d9 /tests/qc/test_parsing.py | |
parent | 8954890bd7410d79ce151196f406b8e1b6985238 (diff) | |
download | gn-uploader-5897b6ec7fbd1226cd68a292122cc494e46f6829.tar.gz |
Fix linting issues
Diffstat (limited to 'tests/qc/test_parsing.py')
-rw-r--r-- | tests/qc/test_parsing.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/qc/test_parsing.py b/tests/qc/test_parsing.py index be13d9b..6c784d5 100644 --- a/tests/qc/test_parsing.py +++ b/tests/qc/test_parsing.py @@ -1,3 +1,4 @@ +"""Test the parsing of the files""" import pytest from quality_control.errors import ParseError @@ -14,8 +15,9 @@ from quality_control.parsing import FileType, parse_file ("tests/test_data/duplicated_headers_no_data_errors.tsv", FileType.STANDARD_ERROR),)) def test_parse_file_fails_with_wrong_filetype_declaration(filepath, filetype, strains): + """Check that parsing fails if the wrong file type is declared""" with pytest.raises(ParseError): - for line in parse_file(filepath, filetype, strains): + for line in parse_file(filepath, filetype, strains): # pylint: disable=[unused-variable] pass @pytest.mark.parametrize( @@ -24,6 +26,7 @@ def test_parse_file_fails_with_wrong_filetype_declaration(filepath, filetype, st ("tests/test_data/average.tsv", FileType.AVERAGE), ("tests/test_data/standarderror.tsv", FileType.STANDARD_ERROR))) def test_parse_file_passes_with_valid_files(filepath, filetype, strains): + """Check that parsing succeeds with valid files""" for line in parse_file(filepath, filetype, strains): assert bool(line) @@ -33,6 +36,7 @@ def test_parse_file_passes_with_valid_files(filepath, filetype, strains): ("tests/test_data/average.tsv", FileType.AVERAGE), ("tests/test_data/standarderror.tsv", FileType.STANDARD_ERROR))) def test_parse_file_works_with_large_files(filepath, filetype, strains): + """Check that parsing succeeds even with large files.""" for line in parse_file(filepath, filetype, strains): assert bool(line) @@ -43,6 +47,7 @@ def test_parse_file_works_with_large_files(filepath, filetype, strains): ("tests/test_data/standarderror_1_error_at_end.tsv", FileType.STANDARD_ERROR), ("tests/test_data/duplicated_headers_no_data_errors.tsv", FileType.AVERAGE))) def test_parse_file_raises_exception_on_error_in_file(filepath, filetype, strains): + "Check that parsing fails if any error is found in a file" with pytest.raises(ParseError): - for line in parse_file(filepath, filetype, strains): + for line in parse_file(filepath, filetype, strains): # pylint: disable=[unused-variable] pass |