mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 00:29:53 +02:00
Add tests for kilometers and miles.
This commit is contained in:
parent
5d49843a79
commit
af65bc5251
1 changed files with 16 additions and 0 deletions
|
@ -29,3 +29,19 @@ def test_meters() -> None:
|
|||
check_length(".05m", .05)
|
||||
check_length(".m", None)
|
||||
check_length("50 m", 50.0)
|
||||
|
||||
|
||||
def test_kilometers() -> None:
|
||||
"""
|
||||
Test length in meters processing.
|
||||
"""
|
||||
check_length("50km", 50_000.0)
|
||||
check_length("50 km", 50_000.0)
|
||||
|
||||
|
||||
def test_miles() -> None:
|
||||
"""
|
||||
Test length in meters processing.
|
||||
"""
|
||||
check_length("1mi", 1609.344)
|
||||
check_length("50 mi", 50 * 1609.344)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue