def __enter__(self): self.basedir = create_tempdir() mod = cjwkernel.pandas.module self.old_defs = {} for name in self.defs.keys(): if name in mod.__dict__: self.old_defs[name] = mod.__dict__[name] mod.__dict__.update(self.defs) return self
def setUp(self): super().setUp() self.basedir = create_tempdir() self.old_cwd = os.getcwd() os.chdir(self.basedir)
def setUp(self): super().setUp() self.basedir = create_tempdir()
def setUp(self): super().setUp() self.basedir = create_tempdir(prefix="basedir-") self.basedir.chmod(0o755)