Skip to content

Commit ea45c61

Browse files
cclaussBoboTiG
authored andcommitted
Test: Use feature detection instead of version detection
1 parent f3eec20 commit ea45c61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_gnu_linux.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
pytestmark = pytest.mark.skip
1616

1717

18-
TEXT = str if sys.version[0] > '2' else unicode
18+
try:
19+
TEXT = unicode # Python 2
20+
except NameError:
21+
TEXT = str # Python 3
1922
PY3 = sys.version[0] > '2'
2023

2124

0 commit comments

Comments
 (0)