Skip to content

Commit 1793849

Browse files
Jeckelmann ManuelJeckelmann Manuel
authored andcommitted
Let test be py2 and py3 compatible
1 parent 59b59ef commit 1793849

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test_all.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ def test_return_correct_commit_hash(self):
3434
cross_valdiating_commit_w_secret_comment = 'OH no a secret'
3535

3636
json_result = ''
37-
tmp_stdout = io.StringIO()
37+
if sys.version_info >= (3,):
38+
tmp_stdout = io.StringIO()
39+
else:
40+
tmp_stdout = io.BytesIO()
3841
bak_stdout = sys.stdout
3942

4043
# Redirect STDOUT, run scan and re-establish STDOUT

0 commit comments

Comments
 (0)