249
249
def patchOS(self, new_root):
251
os.path: ['isfile', 'exists', 'islink', 'isdir'],
251
os.path: [('isfile', 1), ('exists', 1),
252
('islink', 1), ('isdir', 1)],
253
os: [('listdir', 1), ('mkdir', 1),
254
('lstat', 1), ('symlink', 2)],
254
256
for (mod, funcs) in patch_funcs.items():
258
260
self.patched_funcs.enter_context(
259
261
mock.patch.object(mod, f, trap_func))