pyfakefs implements a fake file system that mocks the Python file system modules.
conda install nsidc::pyfakefs