Skip to content

Commit ee84c4a

Browse files
committed
Fill holes in 3.9 coverage
1 parent cf27f98 commit ee84c4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

travertino/src/travertino/style.py

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def __init__(self, **properties):
4343
f"{type(self)}.__init__() got an unexpected keyword argument "
4444
f"'{name}'"
4545
)
46+
# The above for loop should never run to completion, so that needs to be
47+
# excluded from coverage.
48+
else: # pragma: no cover
49+
pass
4650

4751
@property
4852
def _applicator(self):

travertino/tests/test_style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_positional_argument(StyleClass):
154154
def test_constructor_invalid_property(StyleClass):
155155
"""Whether dataclass or not, the error should be the same."""
156156
with pytest.raises(TypeError, match="unexpected keyword argument 'bogus'"):
157-
StyleClass(bogus=None)
157+
StyleClass(explicit_const=5, bogus=None)
158158

159159

160160
@pytest.mark.parametrize("StyleClass", [Style, DeprecatedStyle])

0 commit comments

Comments
 (0)