diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-07-17 20:18:28 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-07-17 20:18:28 -0400 |
commit | 82c7ac41fd85ad48e32c043638554a4482cd872b (patch) | |
tree | 22264eb56aca4699c062221321da979d9046553f /tests | |
parent | d60ed5361d955a6da85b858747bfdc791b0dcb33 (diff) | |
download | cmd2-git-82c7ac41fd85ad48e32c043638554a4482cd872b.tar.gz |
Fix unit test on VSTS Hosted Linux agents
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd2.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index edb72c64..999aee8c 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1426,10 +1426,16 @@ 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' path = utils.which(editor) - # Assert that the vi editor was found because it should exist on all Mac and Linux systems - assert path + + 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 @pytest.mark.skipif(sys.platform.startswith('win'), reason="utils.which function only used on Mac and Linux") |