fakeos is a dropin replacement for the os module that mocks filesystem access.
fakeos is built using the standard library available in Python 2.7. I make no guarantees (currently) about 2.6 or 3.x support, although I am not against it.
import fakeos.fakeos as os os.stuff()
- import os import fakeos.fakeos_patch fakeos_patch() os.stuff()