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

Method test_sets_no_retain

tests/test_funcs.py:444–454  ·  view source on GitHub ↗

Set types are converted to lists if retain_collection_types=False.

(self, C, set_type)

Source from the content-addressed store, hash-verified

442
443 @given(set_type=st.sampled_from((set, frozenset)))
444 def test_sets_no_retain(self, C, set_type):
445 """
446 Set types are converted to lists if retain_collection_types=False.
447 """
448 d = astuple(
449 C(1, set_type((1, 2, 3))),
450 retain_collection_types=False,
451 recurse=True,
452 )
453
454 assert (1, [1, 2, 3]) == d
455
456 def test_named_tuple_retain_type(self):
457 """

Callers

nothing calls this directly

Calls 2

astupleFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected