| 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) |
no outgoing calls