summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorMikhail Ushanov <gm.mephisto@gmail.com>2020-11-17 01:05:15 +0300
committerMikhail Ushanov <gm.mephisto@gmail.com>2020-11-17 01:05:15 +0300
commit6c5eea6e8eb4ed6dbd3deaeba5e1ff86161553ee (patch)
treef01a944b92839319f4a75ad534ffe4ab03da9958 /tests/test_cmd2.py
parentbaf0392007659d069a7fed543335ac5e0e937556 (diff)
downloadcmd2-git-6c5eea6e8eb4ed6dbd3deaeba5e1ff86161553ee.tar.gz
feat(utils): probe editors in system path
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
Diffstat (limited to 'tests/test_cmd2.py')
-rwxr-xr-xtests/test_cmd2.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 554f2ba7..2f24f4d7 100755
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -1275,24 +1275,6 @@ optional arguments:
-s, --shout N00B EMULATION MODE
"""
-@pytest.mark.skipif(sys.platform.startswith('win'),
- reason="utils.which function only used on Mac and Linux")
-def test_which_editor_good():
- editor = cmd2.Cmd.DEFAULT_EDITOR
- path = utils.which(editor)
-
- # 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")
-def test_which_editor_bad():
- nonexistent_editor = 'this_editor_does_not_exist.exe'
- path = utils.which(nonexistent_editor)
- # Assert that the non-existent editor wasn't found
- assert path is None
-
-
class MultilineApp(cmd2.Cmd):
def __init__(self, *args, **kwargs):
super().__init__(*args, multiline_commands=['orate'], **kwargs)