You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The legacy callable form of :func:`pytest.raises`, :func:`pytest.warns` and :func:`pytest.deprecated_call` has been deprecated. Use the context-manager form instead.
:func:`pytest.raises`, :func:`pytest.warns` and :func:`pytest.deprecated_call` now uses :class:`ParamSpec` for the type hint to the (now-deprecated) callable overload, instead of :class:`Any`. This allows type checkers to raise errors when passing incorrect function parameters.
2
+
``func`` can now also be passed as a kwarg, which the type hint previously showed as possible but didn't accept.
Copy file name to clipboardExpand all lines: testing/example_scripts/fixtures/fill_fixtures/test_conftest_funcargs_only_available_in_subdir/sub2/conftest.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,5 +6,5 @@
6
6
7
7
@pytest.fixture
8
8
defarg2(request):
9
-
withpytest.raises(Exception): # noqa: B017
9
+
withpytest.raises(Exception): # noqa: B017 # too general exception
0 commit comments