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

Function test_set_key_no_file

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

Source from the content-addressed store, hash-verified

12
13
14def test_set_key_no_file(tmp_path):
15 nx_file = str(tmp_path / "nx")
16 logger = logging.getLogger("dotenv.main")
17
18 with mock.patch.object(logger, "warning"):
19 result = dotenv.set_key(nx_file, "foo", "bar")
20
21 assert result == (True, "foo", "bar")
22 assert os.path.exists(nx_file)
23
24
25@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected