コード例 #1
0
ファイル: bases.py プロジェクト: evoloji/Eskapade
    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
コード例 #2
0
ファイル: test_bases.py プロジェクト: Patechoc/Eskapade
    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
コード例 #3
0
ファイル: bases.py プロジェクト: evoloji/Eskapade
    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()
コード例 #4
0
ファイル: test_bases.py プロジェクト: Patechoc/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()
コード例 #5
0
    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])
コード例 #6
0
    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])
コード例 #7
0
ファイル: test_element.py プロジェクト: evoloji/Eskapade
 def tearDown(self):
     execution.reset_eskapade()
コード例 #8
0
 def tearDown(self):
     from eskapade.core import execution
     execution.reset_eskapade()
コード例 #9
0
 def tearDown(self):
     super(ApplyFuncToDfTest, self).tear_down_observers()
     from eskapade.core import execution
     execution.reset_eskapade()
コード例 #10
0
 def tearDown(self):
     super(AssertInDsTest, self).tear_down_observers()
     from eskapade.core import execution
     execution.reset_eskapade()