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

Method __get_test_id_2

seleniumbase/fixtures/base_case.py:16570–16589  ·  view source on GitHub ↗

The id for SeleniumBase Dashboard entries.

(self)

Source from the content-addressed store, hash-verified

16568 return test_id[:105] + "__TRUNCATED__" + test_id[-105:]
16569
16570 def __get_test_id_2(self):
16571 """The id for SeleniumBase Dashboard entries."""
16572 if "PYTEST_CURRENT_TEST" in os.environ:
16573 full_name = os.environ["PYTEST_CURRENT_TEST"]
16574 if "] " in full_name:
16575 return full_name.split("] ")[0] + "]"
16576 else:
16577 return full_name.split(" ")[0]
16578 if getattr(self, "is_behave", None):
16579 return self.__get_test_id()
16580 test_id = "%s.%s.%s" % (
16581 self.__class__.__module__.split(".")[-1],
16582 self.__class__.__name__,
16583 self._testMethodName,
16584 )
16585 if self._sb_test_identifier and len(str(self._sb_test_identifier)) > 6:
16586 test_id = self._sb_test_identifier
16587 if test_id.count(".") > 1:
16588 test_id = ".".join(test_id.split(".")[1:])
16589 return test_id
16590
16591 def __get_display_id(self):
16592 """The id for running a test from pytest. (Displayed on Dashboard)"""

Callers 4

skipMethod · 0.95
__insert_test_resultMethod · 0.95
__process_dashboardMethod · 0.95
tearDownMethod · 0.95

Calls 1

__get_test_idMethod · 0.95

Tested by

no test coverage detected