MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / get_test_name

Function get_test_name

seleniumbase/core/log_helper.py:432–453  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

430
431
432def get_test_name(test):
433 if "PYTEST_CURRENT_TEST" in os.environ:
434 full_name = os.environ["PYTEST_CURRENT_TEST"]
435 if "] " in full_name:
436 test_name = full_name.split("] ")[0] + "]"
437 else:
438 test_name = full_name.split(" ")[0]
439 elif test.is_pytest:
440 test_name = "%s.py::%s::%s" % (
441 test.__class__.__module__.split(".")[-1],
442 test.__class__.__name__,
443 test._testMethodName,
444 )
445 else:
446 test_name = "%s.py:%s.%s" % (
447 test.__class__.__module__.split(".")[-1],
448 test.__class__.__name__,
449 test._testMethodName,
450 )
451 if test._sb_test_identifier and len(str(test._sb_test_identifier)) > 6:
452 test_name = test._sb_test_identifier
453 return test_name
454
455
456def get_last_page(driver):

Callers 1

get_test_idFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…