def _setup(self): """ Sets up output directories and the reporter :return: """ self.directory_info = test_runner_helper.directory_setup( self.testfile, self.dynamic_config_module, self.master_config) self.reporter = self._get_reporter() runtime.set_active_tests(self.tests)
def _setup(self): """ Sets up output directories and the reporter :return: """ self.directory_info = test_runner_helper.directory_setup(self.testfile, self.dynamic_config_module, self.master_config) self.reporter = self._get_reporter() runtime.set_active_tests(self.tests)
def test_get_log_for_test(self): """ Tests if we get the logs for test correctly """ test = testobj.Test("Testing_Logs",None,phase=0,iteration=0) test.start_time = time.time() time.sleep(2) test.end_time = time.time() runtime.set_active_tests([test]) output_path = '/tmp/test_test_utils_logs_output' if not os.path.exists(output_path): os.mkdir(output_path) with open(os.path.join(output_path, 'test.log'), 'w') as f: f.write('23:59:59 [main] INFO Testing_Logs') with open(os.path.join(output_path, 'test.log'), 'w') as f: f.write('23:59:59 [main] INFO TestClientService - Sent 100')
def test_get_log_for_test(self): """ Tests if we get the logs for test correctly """ test = testobj.Test("Testing_Logs", None, phase=0, iteration=0) test.start_time = time.time() time.sleep(2) test.end_time = time.time() runtime.set_active_tests([test]) output_path = '/tmp/test_test_utils_logs_output' if not os.path.exists(output_path): os.mkdir(output_path) with open(os.path.join(output_path, 'test.log'), 'w') as f: f.write('23:59:59 [main] INFO Testing_Logs') with open(os.path.join(output_path, 'test.log'), 'w') as f: f.write('23:59:59 [main] INFO TestClientService - Sent 100')