def test_single_subspecies(test_input): parsed = botaxon.load(test_input) assert isinstance(parsed, botaxon.SubSpeciesResult) assert botaxon.load(test_input).name == test_input
def test_single_subspecies_with_composed_species(test_input): with pytest.raises(botaxon.InvalidSpeciesError): botaxon.load(test_input)
def test_single_subspecies_with_hybrid_marker_on_species(test_input): parsed = botaxon.load(test_input) assert isinstance(parsed, botaxon.SubSpeciesResult) assert botaxon.load(test_input).name == test_input
def test_genus(test_input, expected_class): parsed = botaxon.load(test_input) assert isinstance(parsed, expected_class) assert parsed.is_hybrid is False assert parsed.name == test_input
def test_composed_species_with_hybrid_marker(test_input): parsed = botaxon.load(test_input) assert isinstance(parsed, botaxon.SpeciesResult) assert botaxon.load(test_input).name == test_input
def test_invalid_composed_species(test_input): with pytest.raises(botaxon.InvalidSpeciesError): botaxon.load(test_input)