# Path: tests/strategies.py
# @st.composite
# def simple_classes(
#     draw, slots=None, frozen=None, weakref_slot=None, private_attrs=None
# ):
#     """
#     A strategy that generates classes with default non-attr attributes.
# 
#     For example, this strategy might generate a class such as:
# 
#     @attr.s(slots=True, frozen=True, weakref_slot=True)
#     class HypClass:
#         a = attr.ib(default=1)
#         _b = attr.ib(default=None)
#         c = attr.ib(default='text')
#         _d = attr.ib(default=1.0)
#         c = attr.ib(default={'t': 1})
# 
#     By default, all combinations of slots, frozen, and weakref_slot classes
#     will be generated.  If `slots=True` is passed in, only slotted classes will
#     be generated, and if `slots=False` is passed in, no slotted classes will be
#     generated. The same applies to `frozen` and `weakref_slot`.
# 
#     By default, some attributes will be private (i.e. prefixed with an
#     underscore). If `private_attrs=True` is passed in, all attributes will be
#     private, and if `private_attrs=False`, no attributes will be private.
#     """
#     attrs = draw(list_of_attrs)
#     frozen_flag = draw(st.booleans())
#     slots_flag = draw(st.booleans())
#     weakref_flag = draw(st.booleans())
# 
#     if private_attrs is None:
#         attr_names = maybe_underscore_prefix(gen_attr_names())
#     elif private_attrs is True:
#         attr_names = ("_" + n for n in gen_attr_names())
#     elif private_attrs is False:
#         attr_names = gen_attr_names()
# 
#     cls_dict = dict(zip(attr_names, attrs))
#     pre_init_flag = draw(st.booleans())
#     post_init_flag = draw(st.booleans())
#     init_flag = draw(st.booleans())
# 
#     if pre_init_flag:
# 
#         def pre_init(self):
#             pass
# 
#         cls_dict["__attrs_pre_init__"] = pre_init
# 
#     if post_init_flag:
# 
#         def post_init(self):
#             pass
# 
#         cls_dict["__attrs_post_init__"] = post_init
# 
#     if not init_flag:
# 
#         def init(self, *args, **kwargs):
#             self.__attrs_init__(*args, **kwargs)
# 
#         cls_dict["__init__"] = init
# 
#     return make_class(
#         "HypClass",
#         cls_dict,
#         slots=slots_flag if slots is None else slots,
#         frozen=frozen_flag if frozen is None else frozen,
#         weakref_slot=weakref_flag if weakref_slot is None else weakref_slot,
#         init=init_flag,
#     )


import pytest
from hypothesis import given
from .strategies import simple_classes
# SPDX-License-Identifier: MIT

"""
Tests for compatibility against other Python modules.
"""





cloudpickle = pytest.importorskip("cloudpickle")


class TestCloudpickleCompat(object):
    """
    Tests for compatibility with ``cloudpickle``.
    """


# Path: tests/strategies.py
# @st.composite
# def simple_classes(
#     draw, slots=None, frozen=None, weakref_slot=None, private_attrs=None
# ):
#     """
#     A strategy that generates classes with default non-attr attributes.
# 
#     For example, this strategy might generate a class such as:
# 
#     @attr.s(slots=True, frozen=True, weakref_slot=True)
#     class HypClass:
#         a = attr.ib(default=1)
#         _b = attr.ib(default=None)
#         c = attr.ib(default='text')
#         _d = attr.ib(default=1.0)
#         c = attr.ib(default={'t': 1})
# 
#     By default, all combinations of slots, frozen, and weakref_slot classes
#     will be generated.  If `slots=True` is passed in, only slotted classes will
#     be generated, and if `slots=False` is passed in, no slotted classes will be
#     generated. The same applies to `frozen` and `weakref_slot`.
# 
#     By default, some attributes will be private (i.e. prefixed with an
#     underscore). If `private_attrs=True` is passed in, all attributes will be
#     private, and if `private_attrs=False`, no attributes will be private.
#     """
#     attrs = draw(list_of_attrs)
#     frozen_flag = draw(st.booleans())
#     slots_flag = draw(st.booleans())
#     weakref_flag = draw(st.booleans())
# 
#     if private_attrs is None:
#         attr_names = maybe_underscore_prefix(gen_attr_names())
#     elif private_attrs is True:
#         attr_names = ("_" + n for n in gen_attr_names())
#     elif private_attrs is False:
#         attr_names = gen_attr_names()
# 
#     cls_dict = dict(zip(attr_names, attrs))
#     pre_init_flag = draw(st.booleans())
#     post_init_flag = draw(st.booleans())
#     init_flag = draw(st.booleans())
# 
#     if pre_init_flag:
# 
#         def pre_init(self):
#             pass
# 
#         cls_dict["__attrs_pre_init__"] = pre_init
# 
#     if post_init_flag:
# 
#         def post_init(self):
#             pass
# 
#         cls_dict["__attrs_post_init__"] = post_init
# 
#     if not init_flag:
# 
#         def init(self, *args, **kwargs):
#             self.__attrs_init__(*args, **kwargs)
# 
#         cls_dict["__init__"] = init
# 
#     return make_class(
#         "HypClass",
#         cls_dict,
#         slots=slots_flag if slots is None else slots,
#         frozen=frozen_flag if frozen is None else frozen,
#         weakref_slot=weakref_flag if weakref_slot is None else weakref_slot,
#         init=init_flag,
#     )


# Path: tests/test_3rd_party.py
import pytest
from hypothesis import given
from .strategies import simple_classes

# SPDX-License-Identifier: MIT

"""
Tests for compatibility against other Python modules.
"""





cloudpickle = pytest.importorskip("cloudpickle")


class TestCloudpickleCompat(object):
    """
    Tests for compatibility with ``cloudpickle``.
    """


    @given(simple_classes())