Use shorter 'if kwargs' check as requested during review
This commit is contained in:
parent
a5d9fbe2b0
commit
bfe773bfc8
|
@ -597,7 +597,7 @@ def raises(expected_exception, *args, **kwargs):
|
|||
message = kwargs.pop("message")
|
||||
if "match" in kwargs:
|
||||
match_expr = kwargs.pop("match")
|
||||
if len(kwargs.keys()) > 0:
|
||||
if kwargs:
|
||||
msg = 'Unexpected keyword arguments passed to pytest.raises: '
|
||||
msg += ', '.join(kwargs.keys())
|
||||
raise TypeError(msg)
|
||||
|
|
Loading…
Reference in New Issue