MCPcopy
hub / github.com/psf/requests / test_set_environ_raises_exception

Function test_set_environ_raises_exception

tests/test_utils.py:974–981  ·  view source on GitHub ↗

Tests set_environ will raise exceptions in context when the value parameter is None.

()

Source from the content-addressed store, hash-verified

972
973
974def test_set_environ_raises_exception():
975 """Tests set_environ will raise exceptions in context when the
976 value parameter is None."""
977 with pytest.raises(Exception) as exception:
978 with set_environ("test1", None):
979 raise Exception("Expected exception")
980
981 assert "Expected exception" in str(exception.value)
982
983
984@pytest.mark.skipif(os.name != "nt", reason="Test only on Windows")

Callers

nothing calls this directly

Calls 1

set_environFunction · 0.90

Tested by

no test coverage detected