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

Function test_load_dotenv_file_stream

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

Source from the content-addressed store, hash-verified

328
329@mock.patch.dict(os.environ, {}, clear=True)
330def test_load_dotenv_file_stream(dotenv_file):
331 with open(dotenv_file, "w") as f:
332 f.write("a=b")
333
334 with open(dotenv_file, "r") as f:
335 result = dotenv.load_dotenv(stream=f)
336
337 assert result is True
338 assert os.environ == {"a": "b"}
339
340
341def test_load_dotenv_in_current_dir(tmp_path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected