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