1 parent 2207ce3 commit 38af5d3Copy full SHA for 38af5d3
1 file changed
tests/test_command.py
@@ -48,7 +48,7 @@ def test_which_none(self):
48
def test_run_ls(self):
49
response = command.run(['ls', test_path])
50
assert response.exit == 0
51
- assert response.output == """\
+ assert response.output == b"""\
52
__pycache__
53
test_command.py"""
54
@@ -71,11 +71,17 @@ def debug_print(line):
71
out, err = capsys.readouterr()
72
73
74
75
76
77
- assert out == """\
+
78
+ # Pyton 2 vs 3 handles strings in different ways
79
+ if sys.version_info.major is 2:
80
+ assert out == b"""\
81
82
test_command.py
83
"""
84
+ elif sys.version_info.major is 3:
85
+ assert out == "b'__pycache__'\nb'test_command.py'\n"
86
87
assert err == ''
0 commit comments