MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _is_routine

Method _is_routine

tools/python-3.11.9-amd64/Lib/doctest.py:979–988  ·  view source on GitHub ↗

Safely unwrap objects and determine if they are functions.

(self, obj)

Source from the content-addressed store, hash-verified

977 raise ValueError("object must be a class or function")
978
979 def _is_routine(self, obj):
980 """
981 Safely unwrap objects and determine if they are functions.
982 """
983 maybe_routine = obj
984 try:
985 maybe_routine = inspect.unwrap(maybe_routine)
986 except ValueError:
987 pass
988 return inspect.isroutine(maybe_routine)
989
990 def _find(self, tests, obj, name, module, source_lines, globs, seen):
991 """

Callers 1

_findMethod · 0.95

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected