(nodeid, test_suffix=None)
| 287 | |
| 288 | @lazy |
| 289 | def 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 |
nothing calls this directly
no test coverage detected