MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / test_load_dotenv_existing_variable_override

Function test_load_dotenv_existing_variable_override

tests/test_main.py:287–294  ·  view source on GitHub ↗
(dotenv_file)

Source from the content-addressed store, hash-verified

285
286@mock.patch.dict(os.environ, {"a": "c"}, clear=True)
287def test_load_dotenv_existing_variable_override(dotenv_file):
288 with open(dotenv_file, "w") as f:
289 f.write("a=b")
290
291 result = dotenv.load_dotenv(dotenv_file, override=True)
292
293 assert result is True
294 assert os.environ == {"a": "b"}
295
296
297@mock.patch.dict(os.environ, {"a": "c"}, clear=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected