def tearDown(self):
        # We have to remove all the files from the real FS. Doing the same for the
        # fake FS is optional, but doing it is an extra sanity check.
        os.chdir(tempfile.gettempdir())
        try:
            rev_files = self._created_files[:]
            rev_files.reverse()
            for info in rev_files:
                real_path, fake_path = self._Paths(info[1])
                if info[0] == 'd':
                    try:
                        os.rmdir(real_path)
                    except __HOLE__ as e:
                        if 'Directory not empty' in e:
                            self.fail('Real path %s not empty: %s : %s' % (
                                    real_path, e, os.listdir(real_path)))
                        else:
                            raise
                    self.fake_os.rmdir(fake_path)
                if info[0] == 'f' or info[0] == 'l':
                    os.remove(real_path)
                    self.fake_os.remove(fake_path)
        finally:
            shutil.rmtree(self.real_base)
dataset/ETHPy150Open jmcgeheeiv/pyfakefs/fake_filesystem_vs_real_test.py/FakeFilesystemVsRealTest.tearDown