From 5ef89c48c6572936cfbfbd21fcba2f074e42a8a0 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Mon, 7 Aug 2017 23:33:11 -0400 Subject: Fixed unit test error on combination of Python 2.7 and Windows --- tests/test_cmd2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') 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)) -- cgit v1.2.1