MCPcopy Index your code
hub / github.com/python/cpython / _call_if_exists

Function _call_if_exists

Lib/unittest/suite.py:11–13  ·  view source on GitHub ↗
(parent, attr)

Source from the content-addressed store, hash-verified

9
10
11def _call_if_exists(parent, attr):
12 func = getattr(parent, attr, lambda: None)
13 func()
14
15
16class BaseTestSuite(object):

Callers 4

_handleClassSetUpMethod · 0.85
_handleModuleFixtureMethod · 0.85
_handleModuleTearDownMethod · 0.85

Calls 1

funcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…