From a8f9279f3276c699d7c03da33ebae2fcea3f0b6d Mon Sep 17 00:00:00 2001 From: Joerg Henrichs Date: Fri, 9 May 2025 10:15:40 +1000 Subject: [PATCH] #2984 Fix python version test to support python 3.10 --- .../tests/psyir/transformations/transformations_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/psyclone/tests/psyir/transformations/transformations_test.py b/src/psyclone/tests/psyir/transformations/transformations_test.py index 3051fc0375..729ab1b1c2 100644 --- a/src/psyclone/tests/psyir/transformations/transformations_test.py +++ b/src/psyclone/tests/psyir/transformations/transformations_test.py @@ -41,8 +41,10 @@ ''' import os -import pytest import sys + +import pytest + from fparser.common.readfortran import FortranStringReader from psyclone.psyir.nodes import CodeBlock, IfBlock, Literal, Loop, Node, \ Reference, Schedule, Statement, ACCLoopDirective, OMPMasterDirective, \ @@ -571,7 +573,7 @@ def test_omploop_trans_new_options(sample_psyir): # Check python version, as this tests have different behaviour for # new python versions vs 3.8 or 3.7. # TODO #2837: This can be removed when Python 3.7 and 3.8 are retired. - if sys.version_info[1] < 11: + if sys.version_info[1] < 10: with pytest.raises(TypeError) as excinfo: omplooptrans.apply(tree.walk(Loop)[0], collapse="x") assert ("The 'collapse' argument must be an integer or a bool "