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

Function test_set_key_unauthorized_file

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

Source from the content-addressed store, hash-verified

179
180
181def test_set_key_unauthorized_file(dotenv_file):
182 os.chmod(dotenv_file, 0o000)
183
184 with pytest.raises(PermissionError):
185 dotenv.set_key(dotenv_file, "a", "x")
186
187
188def test_unset_non_existent_file(tmp_path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected