From c9b8bb16fd445e64dce87ef0df4fcaab3df0670e Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Thu, 23 Apr 2020 10:28:24 -0400 Subject: Fix unit test which made incorrect assumption that vi editor would exist on all Linux systems --- tests/test_cmd2.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index fe3f25a6..fdeea9aa 100755 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1224,16 +1224,11 @@ optional arguments: @pytest.mark.skipif(sys.platform.startswith('win'), reason="utils.which function only used on Mac and Linux") def test_which_editor_good(): - import platform - editor = 'vi' + editor = cmd2.Cmd.DEFAULT_EDITOR path = utils.which(editor) - if 'azure' in platform.release().lower(): - # vi doesn't exist on VSTS Hosted Linux agents - assert not path - else: - # Assert that the vi editor was found because it should exist on all Mac and Linux systems - assert path + # Assert that the editor was found because some editor should exist on all Mac and Linux systems + assert path @pytest.mark.skipif(sys.platform.startswith('win'), reason="utils.which function only used on Mac and Linux") -- cgit v1.2.1