Skip to content

Commit 092c34e

Browse files
committed
Add version check to unit test
1 parent dd8c80a commit 092c34e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_interpreters.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import pickle
5+
import sys
56

67
import pytest
78

@@ -11,6 +12,10 @@ def test_interpreters():
1112

1213
import mod_test_interpreters as m
1314

15+
if sys.version_info[0] < 3 or sys.version_info[1] < 12:
16+
pytest.skip("Test requires independent subinterpreter support (3.12+)")
17+
return
18+
1419
i = None
1520
try:
1621
# 3.14+
@@ -24,7 +29,6 @@ def test_interpreters():
2429
# 3.12
2530
import _xxsubinterpreters as i
2631
except ImportError:
27-
# <= 3.11
2832
pytest.skip("Test requires a the interpreters stdlib module")
2933
return
3034

0 commit comments

Comments
 (0)