Open
Description
This exists for the benefit of Windows, on which trying to delete an open file results in an error. But really, it would be nice to have a test suite that doesn't leave any temporary files hanging around.
The main culprit is tests like this, where opening a file triggers an error:
with raises_regex(TypeError, 'pip install netcdf4'):
open_dataset(tmp_file, engine='scipy')
The way to fix this is to use mocking of some sort, to intercept calls to backend file objects and close them afterwards.