mirror of
https://github.com/github/codeql.git
synced 2026-05-04 05:05:12 +02:00
Python: Run match tests if Python 3.10 or newer
Also fixes a bug in the tests
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import sys
|
||||
|
||||
def check_output(outtext, f):
|
||||
if outtext == "OK\n":
|
||||
pass
|
||||
@@ -59,8 +61,11 @@ if __name__ == "__main__":
|
||||
check_tests_valid("module-initialization.multiphase")
|
||||
check_tests_valid("fieldflow.test")
|
||||
|
||||
# The below will fail unless we use Python 3.10 or newer.
|
||||
# check_tests_valid("match.test")
|
||||
if sys.version_info[:2] >= (3, 10):
|
||||
print("INFO: Will run `match` tests since we're running Python 3.10 or newer")
|
||||
check_tests_valid("match.test")
|
||||
else:
|
||||
print("WARN: Skipping `match` tests since we're not running 3.10 or newer")
|
||||
|
||||
# The below fails when trying to import modules
|
||||
# check_tests_valid("module-initialization.test")
|
||||
|
||||
Reference in New Issue
Block a user