tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
987 stars 223 forks source link

Closed opened files in some tests. #278

Open Vedingrot opened 3 months ago

Vedingrot commented 3 months ago

Hi, there are some opened files in the tests that cause annoying warnings:

test_extension_without_namespaces (test.GPXTests.test_extension_without_namespaces) ... /usr/lib64/python3.12/unittest/case.py:589: ResourceWarning: unclosed file <_io.TextIOWrapper name='test_files/gpx1.1_with_extensions_without_namespaces.gpx' mode='r' encoding='UTF-8'>
test_garmin_extension (test.GPXTests.test_garmin_extension) ... /usr/lib64/python3.12/unittest/case.py:589: ResourceWarning: unclosed file <_io.TextIOWrapper name='test_files/gpx_with_garmin_extension.gpx' mode='r' encoding='UTF-8'>
test_garmin_extension (test.GPXTests.test_garmin_extension) ... /usr/lib64/python3.12/unittest/case.py:589: ResourceWarning: unclosed file <_io.TextIOWrapper name='test_files/gpx_with_garmin_extension.gpx' mode='r' encoding='UTF-8'>

So, I just closed them.