From 3510799fcaa00ade94dda41bdbc2461021470b20 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Sat, 22 Feb 2025 10:09:49 +0200 Subject: [PATCH] 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. --- tests/basic/test_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/basic/test_editor.py b/tests/basic/test_editor.py index c02d1d95d..adefaf147 100644 --- a/tests/basic/test_editor.py +++ b/tests/basic/test_editor.py @@ -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