File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
importlib_resources/tests Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -209,32 +209,39 @@ def tearDown(self):
209
209
def test_contents_does_not_keep_open (self ):
210
210
c = resources .contents ('ziptestdata' )
211
211
self .zip_path .unlink ()
212
+ del c
212
213
213
214
def test_is_resource_does_not_keep_open (self ):
214
215
c = resources .is_resource ('ziptestdata' , 'binary.file' )
215
216
self .zip_path .unlink ()
217
+ del c
216
218
217
219
def test_is_resource_failure_does_not_keep_open (self ):
218
220
c = resources .is_resource ('ziptestdata' , 'not-present' )
219
221
self .zip_path .unlink ()
222
+ del c
220
223
221
224
def test_path_does_not_keep_open (self ):
222
225
c = resources .path ('ziptestdata' , 'binary.file' )
223
226
self .zip_path .unlink ()
227
+ del c
224
228
225
229
def test_entered_path_does_not_keep_open (self ):
226
230
# This is what certifi does on import to make its bundle
227
231
# available for the process duration.
228
232
c = resources .path ('ziptestdata' , 'binary.file' ).__enter__ ()
229
233
self .zip_path .unlink ()
234
+ del c
230
235
231
236
def test_read_binary_does_not_keep_open (self ):
232
237
c = resources .read_binary ('ziptestdata' , 'binary.file' )
233
238
self .zip_path .unlink ()
239
+ del c
234
240
235
241
def test_read_text_does_not_keep_open (self ):
236
242
c = resources .read_text ('ziptestdata' , 'utf-8.file' , encoding = 'utf-8' )
237
243
self .zip_path .unlink ()
244
+ del c
238
245
239
246
240
247
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments