diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-07 23:33:11 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-08-07 23:33:11 -0400 |
commit | 5ef89c48c6572936cfbfbd21fcba2f074e42a8a0 (patch) | |
tree | c116e60d23e6581d1be863d4a93c98d5e0f9253c /tests/test_cmd2.py | |
parent | 3a3c867c0715e03e30cc30bea7b08604af3aacdc (diff) | |
download | cmd2-git-5ef89c48c6572936cfbfbd21fcba2f074e42a8a0.tar.gz |
Fixed unit test error on combination of Python 2.7 and Windows
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index db834a68..77ee6e6c 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -589,7 +589,10 @@ def test_pipe_to_shell_error(base_app, capsys): expected_error = 'FileNotFoundError' if six.PY2: - expected_error = 'OSError' + if sys.platform.startswith('win'): + expected_error = 'WindowsError' + else: + expected_error = 'OSError' assert err.startswith("EXCEPTION of type '{}' occurred with message:".format(expected_error)) |