MCPcopy Create free account
hub / github.com/catboost/catboost / pytest_configure

Function pytest_configure

library/python/pytest/plugins/ya.py:205–314  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

203
204@pytest.hookimpl(tryfirst=True)
205def pytest_configure(config):
206 global pytest_config
207 pytest_config = config
208
209 config.option.continue_on_collection_errors = True
210
211 config.from_ya_test = from_ya_test()
212 config.test_logs = collections.defaultdict(dict)
213 test_metrics.metrics = {}
214 config.suite_metrics = {}
215 config.configure_timestamp = time.time()
216 context = {
217 "test_stderr": config.option.test_stderr,
218 "test_debug": config.option.test_debug,
219 "build_type": config.option.build_type,
220 "test_traceback": config.option.tbstyle,
221 "flags": config.option.flags,
222 "sanitize": config.option.sanitize,
223 }
224
225 if config.option.collectonly:
226 config.option.mode = yatest_lib.ya.RunMode.List
227
228 config.ya = yatest_lib.ya.Ya(
229 config.option.mode,
230 config.option.source_root,
231 config.option.build_root,
232 config.option.dep_roots,
233 config.option.output_dir,
234 config.option.test_params,
235 context,
236 config.option.python_path,
237 config.option.valgrind_path,
238 config.option.gdb_path,
239 config.option.data_root,
240 project_path=config.option.project_path,
241 )
242 config.option.test_log_level = {
243 "critical": logging.CRITICAL,
244 "error": logging.ERROR,
245 "warning": logging.WARN,
246 "info": logging.INFO,
247 "debug": logging.DEBUG,
248 }[config.option.test_log_level]
249
250 if not config.option.collectonly:
251 setup_logging(os.path.join(config.ya.output_dir, "run.log"), config.option.test_log_level)
252 config.current_item_nodeid = None
253 config.current_test_name = None
254 config.test_cores_count = 0
255 config.collect_cores = config.option.collect_cores
256 config.sanitizer_extra_checks = config.option.sanitizer_extra_checks
257 try:
258 config.test_tool_bin = config.option.test_tool_bin
259 except AttributeError:
260 logging.info("test_tool_bin not specified")
261
262 if config.sanitizer_extra_checks:

Callers

nothing calls this directly

Calls 14

from_ya_testFunction · 0.85
setup_loggingFunction · 0.85
CustomImporterClass · 0.85
configure_pdb_on_demandFunction · 0.85
hasattrFunction · 0.85
setFunction · 0.50
joinMethod · 0.45
infoMethod · 0.45
popMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected