diff options
author | Frederick Muriuki Muriithi | 2024-01-02 09:30:57 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-01-02 09:30:57 +0300 |
commit | ee0cf7de526849f228c73b744bf66d22c30b34de (patch) | |
tree | 97b2758adccae5bb3bc8e688d7d3b845d1a0ddb8 /tests/qc/test_header.py | |
parent | b3b9ba3b5b4e516d6220668155f9b5c57a51eb7d (diff) | |
download | gn-uploader-ee0cf7de526849f228c73b744bf66d22c30b34de.tar.gz |
Mark tests as unit tests.
Diffstat (limited to 'tests/qc/test_header.py')
-rw-r--r-- | tests/qc/test_header.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/qc/test_header.py b/tests/qc/test_header.py index 2557e85..5e54122 100644 --- a/tests/qc/test_header.py +++ b/tests/qc/test_header.py @@ -7,6 +7,7 @@ from quality_control.errors import InvalidValue, DuplicateHeading from quality_control.headers import ( invalid_header, invalid_headings, duplicate_headings) +@pytest.mark.unit_test @given(headers=st.lists(st.text(max_size=10), max_size=1)) def test_invalid_header_with_list_of_one_value(headers): """Test `invalid_header` with invalid header row""" @@ -14,6 +15,7 @@ def test_invalid_header_with_list_of_one_value(headers): 0, 0, "<TAB>".join(headers), "The header MUST contain at least 2 columns") +@pytest.mark.unit_test @given(headings=st.lists(st.text(min_size=2, max_size=10), min_size=2)) def test_invalid_headings_with_invalid_inputs(headings): "Verify that the check for header validity works" @@ -21,6 +23,7 @@ def test_invalid_headings_with_invalid_inputs(headings): InvalidValue(0, col, heading, f"'{heading}' not a valid strain.") for col, heading in enumerate(headings, start=2)) +@pytest.mark.unit_test @pytest.mark.parametrize( "headers", [ (("ProbeSet", "BXD3", "BXD1")), @@ -29,6 +32,7 @@ def test_invalid_header_with_valid_headers(headers): "Verify that the check for header validity works" assert invalid_header(0, headers) is None +@pytest.mark.unit_test @pytest.mark.parametrize( "strains,headings", [ (("BXD1", "BXD2", "BXD3"), ("BXD3", "BXD1")), @@ -38,6 +42,7 @@ def test_invalid_headings_with_valid_headings(strains, headings): "Verify that the check for header validity works" assert invalid_headings(0, strains, headings) == tuple() +@pytest.mark.unit_test @pytest.mark.parametrize( "headers,repeated", [ (("ProbeSet", "BXD3", "BXD1", "BXD1"), {"BXD1": (3, 4)}), @@ -51,6 +56,7 @@ def test_duplicate_headers_with_repeated_column_headings(headers, repeated): f"{','.join(str(i) for i in cols)}")) for head, cols in repeated.items()) +@pytest.mark.unit_test @pytest.mark.parametrize( "headers", [ (("ProbeSet", "BXD3", "BXD1")), |