def setUp(self, doctester=None):
        if self._isStale:
            self._refresh()

        if doctester is not None:
            doctester.globs = self.replaceGlobs(doctester.globs)

        if sys.version_info < (3,):
            # file() was eliminated in Python3
            self._stubs.SmartSet(builtins, 'file', self.fake_open)
        self._stubs.SmartSet(builtins, 'open', self.fake_open)

        for module in self._osModules:
            self._stubs.SmartSet(module,  'os', self.fake_os)
        for module in self._globModules:
            self._stubs.SmartSet(module,  'glob', self.fake_glob)
        for module in self._pathModules:
            self._stubs.SmartSet(module,  'path', self.fake_path)
        for module in self._shutilModules:
            self._stubs.SmartSet(module,  'shutil', self.fake_shutil)
        for module in self._tempfileModules:
            self._stubs.SmartSet(module,  'tempfile', self.fake_tempfile_)
Bind the file-related modules to the :py:mod:`pyfakefs` fake
dataset/ETHPy150Open jmcgeheeiv/pyfakefs/pyfakefs/fake_filesystem_unittest.py/Patcher.setUp