File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ def __init__(self, **properties):
43
43
f"{ type (self )} .__init__() got an unexpected keyword argument "
44
44
f"'{ name } '"
45
45
)
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
46
50
47
51
@property
48
52
def _applicator (self ):
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ def test_positional_argument(StyleClass):
154
154
def test_constructor_invalid_property (StyleClass ):
155
155
"""Whether dataclass or not, the error should be the same."""
156
156
with pytest .raises (TypeError , match = "unexpected keyword argument 'bogus'" ):
157
- StyleClass (bogus = None )
157
+ StyleClass (explicit_const = 5 , bogus = None )
158
158
159
159
160
160
@pytest .mark .parametrize ("StyleClass" , [Style , DeprecatedStyle ])
You can’t perform that action at this time.
0 commit comments