Skip to content

Commit 379f1a5

Browse files
committed
👹 Feed the hobgoblins (delint).
1 parent 22a85ba commit 379f1a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎importlib_resources/tests/test_resource.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,32 +209,39 @@ def tearDown(self):
209209
def test_contents_does_not_keep_open(self):
210210
c = resources.contents('ziptestdata')
211211
self.zip_path.unlink()
212+
del c
212213

213214
def test_is_resource_does_not_keep_open(self):
214215
c = resources.is_resource('ziptestdata', 'binary.file')
215216
self.zip_path.unlink()
217+
del c
216218

217219
def test_is_resource_failure_does_not_keep_open(self):
218220
c = resources.is_resource('ziptestdata', 'not-present')
219221
self.zip_path.unlink()
222+
del c
220223

221224
def test_path_does_not_keep_open(self):
222225
c = resources.path('ziptestdata', 'binary.file')
223226
self.zip_path.unlink()
227+
del c
224228

225229
def test_entered_path_does_not_keep_open(self):
226230
# This is what certifi does on import to make its bundle
227231
# available for the process duration.
228232
c = resources.path('ziptestdata', 'binary.file').__enter__()
229233
self.zip_path.unlink()
234+
del c
230235

231236
def test_read_binary_does_not_keep_open(self):
232237
c = resources.read_binary('ziptestdata', 'binary.file')
233238
self.zip_path.unlink()
239+
del c
234240

235241
def test_read_text_does_not_keep_open(self):
236242
c = resources.read_text('ziptestdata', 'utf-8.file', encoding='utf-8')
237243
self.zip_path.unlink()
244+
del c
238245

239246

240247
if __name__ == '__main__':

0 commit comments

Comments
 (0)