def bare_attrs(draw, defaults=None):
"""
Generate a tuple of an attribute and a strategy that yields values
appropriate for that attribute.
"""
default = NOTHING
if defaults is True or (defaults is None and draw(st.booleans())):
default = None
return ((attr.ib(default=default), st.just(None)))
评论列表
文章目录