MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_warns_context_manager_with_kwargs

Method test_warns_context_manager_with_kwargs

testing/test_recwarn.py:406–410  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

404 assert pytest.warns(UserWarning, f) != "10" # type: ignore[comparison-overlap]
405
406 def test_warns_context_manager_with_kwargs(self) -> None:
407 with pytest.raises(TypeError) as excinfo:
408 with pytest.warns(UserWarning, foo="bar"): # type: ignore
409 pass
410 assert "Unexpected keyword arguments" in str(excinfo.value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected