MCPcopy Create free account
hub / github.com/apache/impala / __call_cls_method_if_exists

Function __call_cls_method_if_exists

tests/conftest.py:482–488  ·  view source on GitHub ↗

Returns the result of calling the method 'method_name' on class 'class' if the class defined such a method, otherwise returns None.

(cls, method_name)

Source from the content-addressed store, hash-verified

480
481
482def __call_cls_method_if_exists(cls, method_name):
483 """Returns the result of calling the method 'method_name' on class 'class' if the class
484 defined such a method, otherwise returns None.
485 """
486 method = getattr(cls, method_name, None)
487 if method:
488 return method()
489
490
491@contextlib.contextmanager

Callers 1

connFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected