def test_str_sparse_typed():
"""Make sure that EnumapMeta's __str___ method works with typed fields"""
class Tools(SparseEnumap):
head = default("your head")
horse: float = default(3.14)
donkey: int = auto()
spatula = default(1)
assert str(Tools) == "Tools(head = 'your head', horse: float = 3.14, donkey: int, spatula = 1)" # noqa
评论列表
文章目录