def tearDown(self): """ Reset to the default configuration. """ tbd = _config.config['dynamic']['root'] _config.reconfigure() try: os.remove(os.path.join(tbd, "config")) os.remove(os.path.join(tbd, "exa.sqlite")) os.remove(os.path.join(tbd, "db.log")) os.remove(os.path.join(tbd, "sys.log")) os.remove(os.path.join(tbd, "notebooks", "tutorial.log")) shutil.rmtree(tbd) except OSError: pass
def setUp(self): """ Generate the temporary test configuration. """ try: shutil.rmtree(os.path.join(_config.config['dynamic']['home'], ".exa_test")) except OSError: pass _config.reconfigure(".exa_test") _config.config['logging']['level'] = "1" _config.reconfigure(".exa_test") _config.config['logging']['level'] = "2" _config.reconfigure(".exa_test") _config.config['logging']['level'] = "3" _config.save(nodel=True) _config.reconfigure(".exa_test") self.assertEqual(_config.config['logging']['level'], "0")