Skip to content

Commit b88f43d

Browse files
committed
Skip these tests for python2 because redirect_stdout is not available
1 parent c4216b2 commit b88f43d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/test_outputs.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
from contextlib import redirect_stdout
1+
try:
2+
from contextlib import redirect_stdout
3+
except:
4+
pass
5+
26
import io
7+
import sys
38

49
import pytest
510

@@ -8,6 +13,8 @@
813
from behavioral.strategy import main as strategy_main
914
from behavioral.strategy import OUTPUT as strategy_output
1015

16+
@pytest.mark.skipif(sys.version_info < (3,4),
17+
reason="requires python3.4 or higher")
1118
@pytest.mark.parametrize("main,output", [
1219
(visitor_main, visitor_output),
1320
(strategy_main, strategy_output),

0 commit comments

Comments
 (0)