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

Function test_set_environ

tests/test_utils.py:965–971  ·  view source on GitHub ↗

Tests set_environ will set environ values and will restore the environ.

(env_name, value)

Source from the content-addressed store, hash-verified

963 ),
964)
965def test_set_environ(env_name, value):
966 """Tests set_environ will set environ values and will restore the environ."""
967 environ_copy = copy.deepcopy(os.environ)
968 with set_environ(env_name, value):
969 assert os.environ.get(env_name) == value
970
971 assert os.environ == environ_copy
972
973
974def test_set_environ_raises_exception():

Callers

nothing calls this directly

Calls 2

set_environFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected