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

Function test_unset_encoding

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

Source from the content-addressed store, hash-verified

167
168
169def test_unset_encoding(dotenv_file):
170 encoding = "latin-1"
171 with open(dotenv_file, "w", encoding=encoding) as f:
172 f.write("é=x")
173
174 result = dotenv.unset_key(dotenv_file, "é", encoding=encoding)
175
176 assert result == (True, "é")
177 with open(dotenv_file, "r", encoding=encoding) as f:
178 assert f.read() == ""
179
180
181def test_set_key_unauthorized_file(dotenv_file):

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected