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

Function test_find_dotenv_found

tests/test_main.py:243–251  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

241
242
243def test_find_dotenv_found(tmp_path):
244 (root, leaf) = prepare_file_hierarchy(tmp_path)
245 os.chdir(str(leaf))
246 dotenv_file = root / ".env"
247 dotenv_file.write_bytes(b"TEST=test\n")
248
249 result = dotenv.find_dotenv(usecwd=True)
250
251 assert result == str(dotenv_file)
252
253
254@mock.patch.dict(os.environ, {}, clear=True)

Callers

nothing calls this directly

Calls 1

prepare_file_hierarchyFunction · 0.85

Tested by

no test coverage detected