diff options
Diffstat (limited to 'tests/unit/test_util.py')
-rw-r--r-- | tests/unit/test_util.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/unit/test_util.py b/tests/unit/test_util.py index e63bd01..debf229 100644 --- a/tests/unit/test_util.py +++ b/tests/unit/test_util.py @@ -1,11 +1,10 @@ -import gzip from datetime import timedelta -from pathlib import Path import pytest import gpxpy from markupsafe import Markup +from testutils import load_gpx_asset from fietsboek import util @@ -59,10 +58,7 @@ def test_round_timedelta_to_multiple(delta, multiple, expected): ("Teasi_1.gpx.gz", timedelta(hours=2)), ]) def test_guess_gpx_timezone(gpx_file, offset): - asset_dir = Path(__file__).parent.parent / 'assets' - test_file = asset_dir / gpx_file - with gzip.open(test_file, 'rb') as fobj: - parsed_gpx = gpxpy.parse(fobj) + parsed_gpx = gpxpy.parse(load_gpx_asset(gpx_file)) timezone = util.guess_gpx_timezone(parsed_gpx) # Here we hope (and assume) that utcoffset is ignored. This is true for # datetime.timezone objects, but may not be for other datetime.tzinfo |