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

Function test_unset_non_existent_file

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

Source from the content-addressed store, hash-verified

186
187
188def test_unset_non_existent_file(tmp_path):
189 nx_file = str(tmp_path / "nx")
190 logger = logging.getLogger("dotenv.main")
191
192 with mock.patch.object(logger, "warning") as mock_warning:
193 result = dotenv.unset_key(nx_file, "foo")
194
195 assert result == (None, "foo")
196 mock_warning.assert_called_once_with(
197 "Can't delete from %s - it doesn't exist.",
198 nx_file,
199 )
200
201
202def prepare_file_hierarchy(path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected