mirror of https://github.com/python/cpython
Fix ResourceWarning in test_normalization
This commit is contained in:
parent
eaedfcb400
commit
70df8f8c67
|
@ -45,6 +45,7 @@ class NormalizationTest(unittest.TestCase):
|
||||||
check=check_version)
|
check=check_version)
|
||||||
except (IOError, HTTPException):
|
except (IOError, HTTPException):
|
||||||
self.skipTest("Could not retrieve " + TESTDATAURL)
|
self.skipTest("Could not retrieve " + TESTDATAURL)
|
||||||
|
self.addCleanup(testdata.close)
|
||||||
for line in testdata:
|
for line in testdata:
|
||||||
if '#' in line:
|
if '#' in line:
|
||||||
line = line.split('#')[0]
|
line = line.split('#')[0]
|
||||||
|
|
Loading…
Reference in New Issue