fix: test for get_environment_editor()

The test for `EDITOR` preference failed to clean up any existing value
of `VISUAL` which may be present in the environment pytest is run in.
This commit is contained in:
Antti Kaihola 2025-02-22 10:09:49 +02:00
parent 1f4a63d6db
commit 3510799fca

View file

@ -21,7 +21,7 @@ def test_get_environment_editor():
assert get_environment_editor("default") == "default"
# Test EDITOR precedence
with patch.dict(os.environ, {"EDITOR": "vim"}):
with patch.dict(os.environ, {"EDITOR": "vim"}, clear=True):
assert get_environment_editor() == "vim"
# Test VISUAL overrides EDITOR