# Path: tests/strategies.py
# def gen_attr_names():
# def maybe_underscore_prefix(source):
# def _create_hyp_nested_strategy(draw, simple_class_strategy):
# def simple_attrs_with_metadata(draw):
# def simple_classes(
#     draw, slots=None, frozen=None, weakref_slot=None, private_attrs=None
# ):
#         def pre_init(self):
#         def post_init(self):
#         def init(self, *args, **kwargs):


from collections import OrderedDict
from hypothesis import assume, given
from hypothesis import strategies as st
from attr import asdict, assoc, astuple, evolve, fields, has
from attr._compat import TYPE, Mapping, Sequence, ordered_dict
from attr.exceptions import AttrsAttributeNotFoundError
from attr.validators import instance_of
from .strategies import nested_classes, simple_classes
import pytest
import attr
    import attr
            C(x=1, y=2), False, dict_factory=dict_factory
        )

    @given(st.sampled_from(MAPPING_TYPES))
    def test_recurse(self, C, dict_class):
        """
        Deep asdict returns correct dict.
        """
        assert {"x": {"x": 1, "y": 2}, "y": {"x": 3, "y": 4}} == asdict(
            C(C(1, 2), C(3, 4)), dict_factory=dict_class
        )

    def test_nested_lists(self, C):
        """
        Test unstructuring deeply nested lists.
        """
        inner = C(1, 2)
        outer = C([[inner]], None)

        assert {"x": [[{"x": 1, "y": 2}]], "y": None} == asdict(outer)

    def test_nested_dicts(self, C):
        """
        Test unstructuring deeply nested dictionaries.
        """
        inner = C(1, 2)
        outer = C({1: {2: inner}}, None)

        assert {"x": {1: {2: {"x": 1, "y": 2}}}, "y": None} == asdict(outer)


# Path: tests/strategies.py
# def gen_attr_names():
# def maybe_underscore_prefix(source):
# def _create_hyp_nested_strategy(draw, simple_class_strategy):
# def simple_attrs_with_metadata(draw):
# def simple_classes(
#     draw, slots=None, frozen=None, weakref_slot=None, private_attrs=None
# ):
#         def pre_init(self):
#         def post_init(self):
#         def init(self, *args, **kwargs):


# Path: tests/test_funcs.py
from collections import OrderedDict
from hypothesis import assume, given
from hypothesis import strategies as st
from attr import asdict, assoc, astuple, evolve, fields, has
from attr._compat import TYPE, Mapping, Sequence, ordered_dict
from attr.exceptions import AttrsAttributeNotFoundError
from attr.validators import instance_of
from .strategies import nested_classes, simple_classes
import pytest
import attr
    import attr

            C(x=1, y=2), False, dict_factory=dict_factory
        )

    @given(st.sampled_from(MAPPING_TYPES))
    def test_recurse(self, C, dict_class):
        """
        Deep asdict returns correct dict.
        """
        assert {"x": {"x": 1, "y": 2}, "y": {"x": 3, "y": 4}} == asdict(
            C(C(1, 2), C(3, 4)), dict_factory=dict_class
        )

    def test_nested_lists(self, C):
        """
        Test unstructuring deeply nested lists.
        """
        inner = C(1, 2)
        outer = C([[inner]], None)

        assert {"x": [[{"x": 1, "y": 2}]], "y": None} == asdict(outer)

    def test_nested_dicts(self, C):
        """
        Test unstructuring deeply nested dictionaries.
        """
        inner = C(1, 2)
        outer = C({1: {2: inner}}, None)

        assert {"x": {1: {2: {"x": 1, "y": 2}}}, "y": None} == asdict(outer)


    @given(nested_classes, st.sampled_from(MAPPING_TYPES))