(dotenv_file)
| 167 | |
| 168 | |
| 169 | def 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 | |
| 181 | def test_set_key_unauthorized_file(dotenv_file): |