python: dataflow tests names in exception handlers

This commit is contained in:
Rasmus Lerchedahl Petersen
2022-11-10 11:12:03 +01:00
parent a7e394b2be
commit e67515fae7
7 changed files with 127 additions and 6 deletions

View File

@@ -51,6 +51,14 @@ def check_tests_valid(testFile):
check_async_test_function(item)
def check_tests_valid_after_version(testFile, version):
if sys.version_info[:2] >= version:
print("INFO: Will run tests in", testFile, "since we're running Python", version, "or newer")
check_tests_valid(testFile)
else:
print("WARN: Will not run tests in", testFile, "since we're running Python", sys.version_info[:2], "and need", version, "or newer")
if __name__ == "__main__":
check_tests_valid("coverage.classes")
check_tests_valid("coverage.test")
@@ -60,12 +68,9 @@ if __name__ == "__main__":
check_tests_valid("variable-capture.dict")
check_tests_valid("module-initialization.multiphase")
check_tests_valid("fieldflow.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")
check_tests_valid_after_version("match.test", (3, 10))
check_tests_valid("exceptions.test")
check_tests_valid_after_version("exceptions.test_group", (3, 11))
# The below fails when trying to import modules
# check_tests_valid("module-initialization.test")