Skip to content

Commit e2eb4ee

Browse files
committed
fix tests
1 parent 21f1636 commit e2eb4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/raises.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def raises(
276276
"""
277277
__tracebackhide__ = True
278278

279-
if func is not None and not args:
279+
if func is None and not args:
280280
if set(kwargs) - {"match", "check", "expected_exception"}:
281281
msg = "Unexpected keyword arguments passed to pytest.raises: "
282282
msg += ", ".join(sorted(kwargs))

0 commit comments

Comments
 (0)