def test_str_typed():
"""Make sure that EnumapMeta's __str___ method works with typed fields"""
class Tools(Enumap):
head = auto()
horse: float = auto()
donkey: int = auto()
spatula = auto()
assert str(Tools) == "Tools(head, horse: float, donkey: int, spatula)"
评论列表
文章目录