summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-04-23 12:02:33 -0400
committerGitHub <noreply@github.com>2020-04-23 12:02:33 -0400
commitf5f397448ec64b17129660b4fb50d76038bf63c8 (patch)
treeda7d7bcd34c2b69cc4f5024f6cc7ba71c68a7670
parent33aa80269e2c5cc32434323b43fe7d7ae302fb2a (diff)
parentc9b8bb16fd445e64dce87ef0df4fcaab3df0670e (diff)
downloadcmd2-git-f5f397448ec64b17129660b4fb50d76038bf63c8.tar.gz
Merge pull request #927 from python-cmd2/which_editor_test
Fix unit test which made incorrect assumption about vi editor
-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")