File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1515import inspect
1616import logging
1717import os
18- import pathlib
1918import re
2019import sys
2120import unittest
@@ -178,13 +177,14 @@ def tearDownClass(cls) -> None:
178177 @classmethod
179178 def setUpClass (cls ) -> None :
180179 # Skip test if python versions doesn't match
181- normalized_path = pathlib .PurePath ("dynamo/cpython" ).as_posix ()
182- regex = re .escape (normalized_path ) + r"\b\d+_\d{2}\b"
183- m = re .search (regex , inspect .getfile (cls ))
180+ prefix = os .path .join ("dynamo" , "cpython" ) + os .path .sep
181+ regex = re .escape (prefix ) + r"\d_\d{2}"
182+ search_path = inspect .getfile (cls )
183+ m = re .search (regex , search_path )
184184 if m :
185- test_py_ver = tuple (map (int , m .group ().split ("_" )))
185+ test_py_ver = tuple (map (int , m .group ().removeprefix ( prefix ). split ("_" )))
186186 py_ver = sys .version_info [:2 ]
187- if py_ver != test_py_ver :
187+ if py_ver < test_py_ver :
188188 expected = "." .join (map (str , test_py_ver ))
189189 got = "." .join (map (str , py_ver ))
190190 raise unittest .SkipTest (
You can’t perform that action at this time.
0 commit comments