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

Method test_dicts

tests/test_funcs.py:400–406  ·  view source on GitHub ↗

If recurse is True, also recurse into dicts.

(self, C, tuple_factory)

Source from the content-addressed store, hash-verified

398
399 @given(st.sampled_from(SEQUENCE_TYPES))
400 def test_dicts(self, C, tuple_factory):
401 """
402 If recurse is True, also recurse into dicts.
403 """
404 res = astuple(C(1, {"a": C(4, 5)}), tuple_factory=tuple_factory)
405 assert tuple_factory([1, {"a": tuple_factory([4, 5])}]) == res
406 assert isinstance(res, tuple_factory)
407
408 @given(container=st.sampled_from(SEQUENCE_TYPES))
409 def test_lists_tuples_retain_type(self, container, C):

Callers

nothing calls this directly

Calls 2

astupleFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected