MCPcopy Create free account
hub / github.com/python/cpython / __getId

Method __getId

Lib/test/libregrtest/testresult.py:34–43  ·  view source on GitHub ↗
(cls, test)

Source from the content-addressed store, hash-verified

32
33 @classmethod
34 def __getId(cls, test):
35 try:
36 test_id = test.id
37 except AttributeError:
38 return str(test)
39 try:
40 return test_id()
41 except TypeError:
42 return str(test_id)
43 return repr(test)
44
45 def startTest(self, test):
46 super().startTest(test)

Callers 1

_add_resultMethod · 0.95

Calls 1

strFunction · 0.85

Tested by

no test coverage detected