Ejemplo n.º 1
0
def test_fromCsvEntry_emptyEntryReturnsEmptyLineage():
    entry = dict()

    actual = Lineage.from_csv_entry(entry)
    expected = Lineage()

    assert actual == expected
Ejemplo n.º 2
0
def test_fromCsvEntry_realEntryEntryReturnsLineage():
    library = csv.DictReader(TEST_CASE_DIR.joinpath("test_library.csv").open())
    entry = next(library)

    actual = Lineage.from_csv_entry(entry)
    expected = Lineage(
        species="M. tuberculosis",
        lineage="Lineage 1",
        sublineage="Sublineage 7",
        name="Indo_Oceanic",
    )

    assert actual == expected