def setUp(self): """Set up test""" execution.reset_eskapade() settings = process_manager.service(ConfigObject) settings['analysisName'] = self.__class__.__name__ settings['logLevel'] = LogLevel.DEBUG settings['batchMode'] = True
def setUp(self): """Set up test""" execution.reset_eskapade() proc_mgr = ProcessManager() settings = proc_mgr.service(ConfigObject) settings['analysisName'] = self.__class__.__name__ settings['logLevel'] = definitions.LOG_LEVELS['DEBUG'] settings['batchMode'] = True
def tearDown(self): """Tear down test""" # remove persisted results for this test path = persistence.io_dir('ana_results') if os.path.exists(path): shutil.rmtree(path) # reset run process execution.reset_eskapade()
def tearDown(self): """Tear down test""" # remove persisted results for this test path = persistence.io_dir( 'ana_results', ProcessManager().service(ConfigObject).io_conf()) if os.path.exists(path): shutil.rmtree(path) # reset run process execution.reset_eskapade()
def test_esk105bc(self): settings = ProcessManager().service(ConfigObject) settings['logLevel'] = definitions.LOG_LEVELS['DEBUG'] settings['macro'] = settings[ 'esRoot'] + '/tutorials/esk105_B_store_each_chain.py' status = execution.run_eskapade(settings) pm = ProcessManager() settings = ProcessManager().service(ConfigObject) ds = ProcessManager().service(DataStore) # results of all three chains have been persisted self.assertTrue(status.isSuccess()) path = '{0:s}/{1:s}/proc_service_data/v0/_chain{{:d}}/{2:s}.pkl'.format( settings['resultsDir'], settings['analysisName'], str(DataStore)) for path_it in range(1, 4): self.assertTrue(os.path.exists(path.format(path_it))) execution.reset_eskapade() settings = ProcessManager().service(ConfigObject) settings['logLevel'] = definitions.LOG_LEVELS['DEBUG'] settings['macro'] = settings[ 'esRoot'] + '/tutorials/esk105_C_begin_at_chain3.py' status = execution.run_eskapade(settings) ds = ProcessManager().service(DataStore) # object from all three chains are present self.assertTrue(status.isSuccess()) self.assertTrue('f' in ds) self.assertTrue('g' in ds) self.assertTrue('h' in ds) self.assertEqual(3, len(ds.keys())) self.assertEqual(7, ds['f']['n_favorite']) self.assertEqual(1, ds['g']['a']) self.assertEqual(7, ds['h'][1])
def test_esk105bc(self): self.eskapade_run(resources.tutorial('esk105_B_store_each_chain.py')) settings = process_manager.service(ConfigObject) # results of all three chains have been persisted path = '{0:s}/{1:s}/proc_service_data/v0/_chain{{:d}}/{2:s}.pkl'.format( settings['resultsDir'], settings['analysisName'], str(DataStore)) for path_it in range(1, 4): self.assertTrue(os.path.exists(path.format(path_it))) execution.reset_eskapade() self.eskapade_run(resources.tutorial('esk105_C_begin_at_chain3.py')) ds = process_manager.service(DataStore) # object from all three chains are present self.assertTrue('f' in ds) self.assertTrue('g' in ds) self.assertTrue('h' in ds) self.assertEqual(3, len(ds)) self.assertEqual(7, ds['f']['n_favorite']) self.assertEqual(1, ds['g']['a']) self.assertEqual(7, ds['h'][1])
def tearDown(self): execution.reset_eskapade()
def tearDown(self): from eskapade.core import execution execution.reset_eskapade()
def tearDown(self): super(ApplyFuncToDfTest, self).tear_down_observers() from eskapade.core import execution execution.reset_eskapade()
def tearDown(self): super(AssertInDsTest, self).tear_down_observers() from eskapade.core import execution execution.reset_eskapade()