MCPcopy
hub / github.com/python-attrs/attrs / test_recurse

Method test_recurse

tests/test_funcs.py:314–320  ·  view source on GitHub ↗

Deep astuple returns correct tuple.

(self, C, tuple_factory)

Source from the content-addressed store, hash-verified

312
313 @given(st.sampled_from(SEQUENCE_TYPES))
314 def test_recurse(self, C, tuple_factory):
315 """
316 Deep astuple returns correct tuple.
317 """
318 assert tuple_factory(
319 [tuple_factory([1, 2]), tuple_factory([3, 4])]
320 ) == astuple(C(C(1, 2), C(3, 4)), tuple_factory=tuple_factory)
321
322 @given(nested_classes, st.sampled_from(SEQUENCE_TYPES))
323 def test_recurse_property(self, cls, tuple_class):

Callers

nothing calls this directly

Calls 2

astupleFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected