diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-11-21 14:44:15 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-11-21 14:44:15 -0500 |
commit | 20951e94a213eaec3a2f46f8089099256329d0e7 (patch) | |
tree | 02cf6743ce8b8d411fd4e2148b8e90d5806c483a /tests/test_utils.py | |
parent | 48924c662faeaafb024ffc821698918d7c954fd2 (diff) | |
download | cmd2-git-editors.tar.gz |
Fix unit test that was failing when EDITOR environment variable was seteditors
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index f4a082ae..5336ccfd 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -652,7 +652,7 @@ def test_find_editor_not_specified(): editor = cu.find_editor() assert editor - # Overwrite path env setting with invalid path. No editor should be found. - with mock.patch.dict(os.environ, {'PATH': 'fake_dir'}): + # Overwrite path env setting with invalid path, clear all other env vars so no editor should be found. + with mock.patch.dict(os.environ, {'PATH': 'fake_dir'}, clear=True): editor = cu.find_editor() assert editor is None |