File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ def extract_species(metadata: dict) -> models.SpeciesType | None:
474474 break
475475 if value_id is None :
476476 raise ValueError (
477- f"Cannot interpret species field: { value } . Please "
477+ f"Cannot interpret species field: { value_orig } . Please "
478478 "contact help@dandiarchive.org to add your species. "
479479 "You can also put the entire url from NCBITaxon "
480480 "(http://www.ontobee.org/ontology/NCBITaxon) into "
Original file line number Diff line number Diff line change @@ -513,6 +513,12 @@ def test_species():
513513 }
514514
515515
516+ def test_extract_unknown_species ():
517+ with pytest .raises (ValueError ) as excinfo :
518+ extract_species ({"species" : "mumba-jumba" })
519+ assert str (excinfo .value ).startswith ("Cannot interpret species field: mumba-jumba" )
520+
521+
516522def test_species_map ():
517523 # all alternative names should be lower case
518524 for common_names , * _ in species_map :
You can’t perform that action at this time.
0 commit comments