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

Function test_set_key_encoding

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

Source from the content-addressed store, hash-verified

54
55
56def test_set_key_encoding(dotenv_file):
57 encoding = "latin-1"
58
59 result = dotenv.set_key(dotenv_file, "a", "é", encoding=encoding)
60
61 assert result == (True, "a", "é")
62 assert open(dotenv_file, "r", encoding=encoding).read() == "a='é'\n"
63
64
65def test_set_key_permission_error(dotenv_file):

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected