File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
openfisca_core/indexed_enums/tests Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 44
55
66class MyEnum (Enum ):
7+ """An enum…"""
8+
79 foo = b"foo"
810 bar = b"bar"
911
Original file line number Diff line number Diff line change 55
66
77class MyEnum (Enum ):
8+ """An enum…"""
9+
810 foo = b"foo"
911 bar = b"bar"
1012
1113
1214@pytest .fixture
1315def enum_array ():
16+ """An enum array…"""
17+
1418 return EnumArray ([numpy .array (1 )], MyEnum )
1519
1620
@@ -34,10 +38,12 @@ def test_enum_array_any_other_operation(enum_array):
3438
3539
3640def test_enum_array___repr__ (enum_array ):
41+ """Enum arrays have a custom debugging representation."""
3742
3843 assert repr (enum_array ) == "EnumArray([<MyEnum.bar: b'bar'>])"
3944
4045
4146def test_enum_array___str__ (enum_array ):
47+ """Enum arrays have a custom end-user representation."""
4248
4349 assert str (enum_array ) == "['bar']"
You can’t perform that action at this time.
0 commit comments