def setUp(self): self.tmpdir = tempfile.TemporaryDirectory(prefix="fract4d_") import sys if sys.platform[:6] == "darwin": self.userConfig = fractconfig.DarwinConfig("") else: self.userConfig = fractconfig.T("") self.userConfig.set("general", "cache_dir", os.path.join(self.tmpdir.name, "gnofract4d-cache")) self.userConfig["formula_path"] = {"formulas": None} self.g_comp = fc.Compiler(self.userConfig)
def setUpClass(cls): cls.tmpdir = tempfile.TemporaryDirectory(prefix="fract4d_") import sys if sys.platform[:6] == "darwin": cls.userConfig = fractconfig.DarwinConfig("") else: cls.userConfig = fractconfig.T("") cls.userConfig.set("general", "cache_dir", os.path.join(cls.tmpdir.name, "gnofract4d-cache")) cls.userConfig["formula_path"].clear() cls.userConfig["map_path"].clear() cls.g_comp = fc.Compiler(cls.userConfig) cls.g_comp.add_func_path("formulas") cls.g_comp.add_func_path("testdata/formulas")
def testDarwin(self): c = fractconfig.DarwinConfig("testprefs") self.assertEqual("open -e", c.get_default_editor())