diff options
-rw-r--r-- | tests/assets/Synthetic_BRouter_1.gpx.gz | bin | 0 -> 697 bytes | |||
-rw-r--r-- | tests/assets/Synthetic_WT2.gpx.gz | bin | 0 -> 18941 bytes | |||
-rw-r--r-- | tests/unit/test_util.py | 13 |
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/assets/Synthetic_BRouter_1.gpx.gz b/tests/assets/Synthetic_BRouter_1.gpx.gz Binary files differnew file mode 100644 index 0000000..e380fc7 --- /dev/null +++ b/tests/assets/Synthetic_BRouter_1.gpx.gz diff --git a/tests/assets/Synthetic_WT2.gpx.gz b/tests/assets/Synthetic_WT2.gpx.gz Binary files differnew file mode 100644 index 0000000..eb74472 --- /dev/null +++ b/tests/assets/Synthetic_WT2.gpx.gz 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) |