17 lines
499 B
Python
17 lines
499 B
Python
from bincio.extract.sport import normalise_sport
|
|
|
|
|
|
def test_cycling_variants():
|
|
for raw in ("cycling", "Biking", "road_biking", "virtual_ride", "e-biking"):
|
|
assert normalise_sport(raw) == "cycling", raw
|
|
|
|
|
|
def test_running_variants():
|
|
for raw in ("running", "Run", "trail_running", "virtual_run"):
|
|
assert normalise_sport(raw) == "running", raw
|
|
|
|
|
|
def test_unknown_falls_back_to_other():
|
|
assert normalise_sport("yoga") == "other"
|
|
assert normalise_sport(None) == "other"
|