Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed opened files in some tests. #278

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3291,6 +3291,7 @@ def test_extension_without_namespaces(self) -> None:
self.assertEqual(2, len(gpx.waypoints[0].extensions))
self.assertEqual("bbb", gpx.waypoints[0].extensions[0].text)
self.assertEqual("eee", list(gpx.waypoints[0].extensions[1])[0].text.strip())
f.close()

def test_garmin_extension(self) -> None:
f = open('test_files/gpx_with_garmin_extension.gpx')
Expand All @@ -3299,6 +3300,7 @@ def test_garmin_extension(self) -> None:
self.assertTrue("<gpxtpx:TrackPointExtension>" in xml)
self.assertTrue("<gpxtpx:hr>171</gpxtpx:hr>" in xml)
print(gpx.to_xml())
f.close()

def test_with_ns_namespace(self) -> None:
gpx_with_ns = mod_gpxpy.parse("""<?xml version="1.0" encoding="UTF-8"?>
Expand Down Expand Up @@ -3378,6 +3380,7 @@ def test_small_floats(self) -> None:

xml = gpx.to_xml()
self.assertNotIn('e-', xml)
f.close()

def test_gpx_fill_time_data_with_start_time_and_end_time(self) -> None:
gpx = self.parse('cerknicko-jezero.gpx')
Expand Down