diff options
author | Jose <jose@zeroc.com> | 2021-01-19 00:08:00 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2021-01-19 00:08:00 +0100 |
commit | d3fee57d4a4b6f8903637350c895049e46666798 (patch) | |
tree | c8f072eefe0343b7dd3b15424504e9420964c8f7 /python/test/Ice/asyncio/test.py | |
parent | Update to MSbuild builder 5.0.6 (diff) | |
download | ice-d3fee57d4a4b6f8903637350c895049e46666798.tar.bz2 ice-d3fee57d4a4b6f8903637350c895049e46666798.tar.xz ice-d3fee57d4a4b6f8903637350c895049e46666798.zip |
Check the python version of the interpreter running the tests
Diffstat (limited to 'python/test/Ice/asyncio/test.py')
-rw-r--r-- | python/test/Ice/asyncio/test.py | 10 |
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__) |