MCPcopy
hub / github.com/pytest-dev/pytest / isiterable

Function isiterable

src/_pytest/assertion/_guards.py:36–41  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

34
35
36def isiterable(obj: object) -> TypeGuard[collections.abc.Iterable[object]]:
37 try:
38 iter(obj) # type: ignore[call-overload]
39 return not istext(obj)
40 except Exception:
41 return False
42
43
44def has_default_eq(obj: object) -> bool:

Callers 1

_compare_eq_anyFunction · 0.90

Calls 1

istextFunction · 0.85

Tested by

no test coverage detected