示例#1
0
文件: ya.py 项目: pro100olga/catboost
 def __init__(self, nodeid, test_suffix, keywords=None):
     self._result = None
     self.nodeid = nodeid
     self._class_name, self._test_name = tools.split_node_id(nodeid, test_suffix)
     self._duration = 0
     self._error = ""
     self._keywords = keywords if keywords is not None else {}
示例#2
0
文件: ya.py 项目: iamnik13/catboost
 def __init__(self, nodeid, test_suffix, keywords=None):
     self._result = None
     self.nodeid = nodeid
     self._class_name, self._test_name = tools.split_node_id(nodeid, test_suffix)
     self._duration = 0
     self._error = ""
     self._keywords = keywords if keywords is not None else {}
示例#3
0
文件: ya.py 项目: pro100olga/catboost
 def __init__(self, report, result, test_suffix):
     self._result = result
     self.nodeid = report.nodeid
     self._class_name, self._test_name = tools.split_node_id(self.nodeid, test_suffix)
     self._error = None
     self._status = None
     self._process_report(report)
     self._duration = hasattr(report, 'duration') and report.duration or 0
     self._keywords = getattr(report, "keywords", {})
示例#4
0
文件: ya.py 项目: iamnik13/catboost
 def __init__(self, report, result, test_suffix):
     self._result = result
     self.nodeid = report.nodeid
     self._class_name, self._test_name = tools.split_node_id(self.nodeid, test_suffix)
     self._error = None
     self._status = None
     self._process_report(report)
     self._duration = hasattr(report, 'duration') and report.duration or 0
     self._keywords = getattr(report, "keywords", {})
示例#5
0
文件: ya.py 项目: blockspacer/xtok
def pytest_runtest_setup(item):
    item.rusage = _get_rusage()
    pytest.config.test_cores_count = 0
    pytest.config.current_item_nodeid = item.nodeid
    class_name, test_name = tools.split_node_id(item.nodeid)
    test_log_path = tools.get_test_log_file_path(pytest.config.ya.output_dir,
                                                 class_name, test_name)
    setup_logging(os.path.join(pytest.config.ya.output_dir, "run.log"),
                  pytest.config.option.test_log_level, test_log_path)
    pytest.config.test_logs[item.nodeid]['log'] = test_log_path
    pytest.config.test_logs[
        item.nodeid]['logsdir'] = pytest.config.ya.output_dir
    pytest.config.current_test_log_path = test_log_path
    pytest.config.current_test_name = "{}::{}".format(class_name, test_name)
    separator = "#" * 100
    yatest_logger.info(separator)
    yatest_logger.info(test_name)
    yatest_logger.info(separator)
    yatest_logger.info("Test setup")

    test_item = CrashedTestItem(item.nodeid, pytest.config.option.test_suffix)
    pytest.config.ya_trace_reporter.on_start_test_class(test_item)
    pytest.config.ya_trace_reporter.on_start_test_case(test_item)
示例#6
0
文件: ya.py 项目: iamnik13/catboost
def pytest_runtest_setup(item):
    item.rusage = _get_rusage()
    pytest.config.test_cores_count = 0
    pytest.config.current_item_nodeid = item.nodeid
    class_name, test_name = tools.split_node_id(item.nodeid)
    test_log_path = tools.get_test_log_file_path(pytest.config.ya.output_dir, class_name, test_name)
    setup_logging(
        os.path.join(pytest.config.ya.output_dir, "run.log"),
        pytest.config.option.test_log_level,
        test_log_path
    )
    pytest.config.test_logs[item.nodeid]['log'] = test_log_path
    pytest.config.test_logs[item.nodeid]['logsdir'] = pytest.config.ya.output_dir
    pytest.config.current_test_log_path = test_log_path
    pytest.config.current_test_name = "{}::{}".format(class_name, test_name)
    separator = "#" * 100
    yatest_logger.info(separator)
    yatest_logger.info(test_name)
    yatest_logger.info(separator)
    yatest_logger.info("Test setup")

    test_item = CrashedTestItem(item.nodeid, pytest.config.option.test_suffix)
    pytest.config.ya_trace_reporter.on_start_test_class(test_item)
    pytest.config.ya_trace_reporter.on_start_test_case(test_item)
示例#7
0
文件: ya.py 项目: afcarl/catboost
def pytest_runtest_call(item):
    class_name, test_name = tools.split_node_id(item.nodeid)
    yatest_logger.info("Test call (class_name: %s, test_name: %s)", class_name,
                       test_name)