We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21f1636 commit e2eb4eeCopy full SHA for e2eb4ee
src/_pytest/raises.py
@@ -276,7 +276,7 @@ def raises(
276
"""
277
__tracebackhide__ = True
278
279
- if func is not None and not args:
+ if func is None and not args:
280
if set(kwargs) - {"match", "check", "expected_exception"}:
281
msg = "Unexpected keyword arguments passed to pytest.raises: "
282
msg += ", ".join(sorted(kwargs))
0 commit comments