Fix the ResourceWarning in test_urllib.py due changes made for #16301. Patch by Berker Peksag
This commit is contained in:
parent
a212114a96
commit
3a81580719
|
@ -280,7 +280,8 @@ Content-Type: text/html; charset=iso-8859-1
|
|||
tmp_fileurl = 'file://localhost' + tmp_file
|
||||
|
||||
self.assertTrue(os.path.exists(tmp_file))
|
||||
self.assertTrue(urlopen(tmp_fileurl))
|
||||
with urlopen(tmp_fileurl) as fobj:
|
||||
self.assertTrue(fobj)
|
||||
|
||||
os.unlink(tmp_file)
|
||||
self.assertFalse(os.path.exists(tmp_file))
|
||||
|
|
Loading…
Reference in New Issue