Skip to content

Commit 16ff5b9

Browse files
author
Mauko Quiroga
committed
Add missing doc to enums
1 parent a3dbd94 commit 16ff5b9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

openfisca_core/indexed_enums/tests/test_enum.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55

66
class MyEnum(Enum):
7+
"""An enum…"""
8+
79
foo = b"foo"
810
bar = b"bar"
911

openfisca_core/indexed_enums/tests/test_enum_array.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55

66

77
class MyEnum(Enum):
8+
"""An enum…"""
9+
810
foo = b"foo"
911
bar = b"bar"
1012

1113

1214
@pytest.fixture
1315
def 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

3640
def 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

4146
def test_enum_array___str__(enum_array):
47+
"""Enum arrays have a custom end-user representation."""
4248

4349
assert str(enum_array) == "['bar']"

0 commit comments

Comments
 (0)