MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_generic_sized_iterable_object

Method test_generic_sized_iterable_object

testing/python/approx.py:863–872  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

861 assert approx(expected, rel=5e-8, abs=0) != actual
862
863 def test_generic_sized_iterable_object(self):
864 class MySizedIterable:
865 def __iter__(self):
866 return iter([1, 2, 3, 4])
867
868 def __len__(self):
869 return 4
870
871 expected = MySizedIterable()
872 assert [1, 2, 3, 4] == approx(expected)

Callers

nothing calls this directly

Calls 2

approxFunction · 0.90
MySizedIterableClass · 0.85

Tested by

no test coverage detected