summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-04-23 10:28:24 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2020-04-23 10:28:24 -0400
commitc9b8bb16fd445e64dce87ef0df4fcaab3df0670e (patch)
treeda7d7bcd34c2b69cc4f5024f6cc7ba71c68a7670 /tests/test_cmd2.py
parent33aa80269e2c5cc32434323b43fe7d7ae302fb2a (diff)
downloadcmd2-git-c9b8bb16fd445e64dce87ef0df4fcaab3df0670e.tar.gz
Fix unit test which made incorrect assumption that vi editor would exist on all Linux systems
Diffstat (limited to 'tests/test_cmd2.py')
-rwxr-xr-xtests/test_cmd2.py11
1 files changed, 3 insertions, 8 deletions
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")