Ejemplo n.º 1
0
 def test_benchmark_template(self):
     """ test run in single thread """
     path_config = os.path.join(self.path_out, 'sample_config.yaml')
     save_config_yaml(path_config, {})
     params = {
         'path_table': PATH_CSV_COVER_MIX,
         'path_out': self.path_out,
         'path_config': path_config,
         'nb_workers': 2,
         'unique': False,
         'visual': True,
     }
     benchmark = BmTemplate(params)
     benchmark.run()
     self.check_benchmark_results(
         benchmark, final_means=[28., 68., 73., 76., 95.], final_stds=[1., 13., 28., 28., 34.]
     )
     os.remove(path_config)
Ejemplo n.º 2
0
 def test_benchmark_template(self):
     """ test run in single thread """
     path_config = os.path.join(self.path_out, 'sample_config.txt')
     open(path_config, 'w').close()
     params = {
         'path_cover': PATH_CSV_COVER_MIX,
         'path_out': self.path_out,
         'nb_workers': 2,
         'unique': False,
         'visual': True,
         'path_sample_config': path_config,
     }
     benchmark = BmTemplate(params)
     benchmark.run()
     self.check_benchmark_results(benchmark,
                                  final_means=[28., 68., 73., 76.],
                                  final_stds=[13., 28., 28., 34.])
     os.remove(path_config)
     del benchmark