Skip to content

Commit

Permalink
Fix typing hint?
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Jan 5, 2025
1 parent b8a03c8 commit 1584737
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/TestScripts/DiscoverTests/VerifyRegistration.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import re
import json
from collections import namedtuple
from typing import List

TestInfo = namedtuple('TestInfo', ['name', 'tags'])

Expand Down Expand Up @@ -64,7 +65,7 @@ def build_project(sources_dir, output_base_path, catch2_path):



def get_test_names(build_path: str) -> list[TestInfo]:
def get_test_names(build_path: str) -> List[TestInfo]:
# For now we assume that Windows builds are done using MSBuild under
# Debug configuration. This means that we need to add "Debug" folder
# to the path when constructing it. On Linux, we don't add anything.
Expand Down Expand Up @@ -102,7 +103,7 @@ def get_ctest_listing(build_path):
os.chdir(old_path)
return result.stdout

def extract_tests_from_ctest(ctest_output) -> list[TestInfo]:
def extract_tests_from_ctest(ctest_output) -> List[TestInfo]:
ctest_response = json.loads(ctest_output)
tests = ctest_response['tests']
test_infos = []
Expand Down Expand Up @@ -131,7 +132,7 @@ def check_DL_PATHS(ctest_output):
if property['name'] == 'ENVIRONMENT_MODIFICATION':
assert len(property['value']) == 2, f"The test provides 2 arguments to DL_PATHS, but instead found {len(property['value'])}"

def escape_catch2_test_names(infos: list[TestInfo]):
def escape_catch2_test_names(infos: List[TestInfo]):
escaped = []
for info in infos:
name = info.name
Expand Down

0 comments on commit 1584737

Please sign in to comment.