summaryrefslogtreecommitdiff
path: root/python/test/Ice/asyncio/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/test/Ice/asyncio/test.py')
-rw-r--r--python/test/Ice/asyncio/test.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/python/test/Ice/asyncio/test.py b/python/test/Ice/asyncio/test.py
index 5e4ba559841..8df759f8107 100644
--- a/python/test/Ice/asyncio/test.py
+++ b/python/test/Ice/asyncio/test.py
@@ -3,7 +3,15 @@
# Copyright (c) ZeroC, Inc. All rights reserved.
#
+
# This test requires asyncio methods which are only available with Python 3.7
+# We want to check the version of the python interpreter used to run the tests
+# not the version of the python interpreter running this script see --python option
+
+version = subprocess.check_output([currentConfig.python,
+ "-c",
+ "import sys; print(f\"{sys.version_info[0]}.{sys.version_info[1]}\")"], text=True)
+version = tuple(int(num) for num in version.split("."))
-if sys.version_info >= (3, 7):
+if version >= (3, 7):
TestSuite(__name__)