aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_util.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/test_util.py b/tests/unit/test_util.py
index debf229..b35f218 100644
--- a/tests/unit/test_util.py
+++ b/tests/unit/test_util.py
@@ -66,6 +66,19 @@ def test_guess_gpx_timezone(gpx_file, offset):
assert timezone.utcoffset(None) == offset
+@pytest.mark.parametrize('gpx_file', [
+ 'Teasi_1.gpx.gz',
+ 'MyTourbook_1.gpx.gz',
+ 'Synthetic_WT2.gpx.gz',
+ 'Synthetic_BRouter_1.gpx.gz',
+])
+def test_tour_metadata(gpx_file):
+ # Here we simply make sure that we do not crash the metadata extraction
+ # function.
+ gpx_data = load_gpx_asset(gpx_file)
+ assert util.tour_metadata(gpx_data) is not None
+
+
@pytest.mark.parametrize('mps, kph', [(1, 3.6), (10, 36)])
def test_mps_to_kph(mps, kph):
assert util.mps_to_kph(mps) == pytest.approx(kph, 0.1)