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

Function split_node_id

library/python/pytest/yatest_tools.py:289–309  ·  view source on GitHub ↗
(nodeid, test_suffix=None)

Source from the content-addressed store, hash-verified

287
288@lazy
289def split_node_id(nodeid, test_suffix=None):
290 path, possible_open_bracket, params = nodeid.partition('[')
291 separator = "::"
292 test_name = None
293 if separator in path:
294 path, test_name = path.split(separator, 1)
295 path = _unify_path(path)
296 class_name = os.path.basename(path)
297 if test_name is None:
298 test_name = class_name
299 if test_suffix:
300 test_name += "::" + test_suffix
301 if separator in test_name:
302 klass_name, test_name = test_name.split(separator, 1)
303 if not test_suffix:
304 # test suffix is used for flakes and pep8, no need to add class_name as it's === class_name
305 class_name += separator + klass_name
306 if separator in test_name:
307 test_name = test_name.split(separator)[-1]
308 test_name += possible_open_bracket + params
309 return yatest_lib.tools.to_utf8(class_name), yatest_lib.tools.to_utf8(test_name)
310
311
312@lazy

Callers

nothing calls this directly

Calls 3

_unify_pathFunction · 0.70
partitionMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected