Skip to content

Commit

Permalink
sst_unittest_support.py: fix specificity of generic type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
berquist committed Nov 15, 2024
1 parent d102f82 commit 95243e8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sst/core/testingframework/sst_unittest_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ def _testing_check_is_scenario_filtering_enabled(scenario_name: str) -> bool:

###

def skip_on_scenario(scenario_name: str, reason: str) -> Callable:
# Used for unittest.skip decorator; taken from
# https://github.com/python/typeshed/blob/8cdc1c141b0b9fb617da87319b23206151ab9954/stdlib/unittest/case.pyi#L35
_FT = TypeVar("_FT", bound=Callable[..., Any])

def skip_on_scenario(scenario_name: str, reason: str) -> Callable[[_FT], _FT]:
""" Skip a test if a scenario filter name is enabled
Args:
Expand All @@ -390,7 +394,7 @@ def skip_on_scenario(scenario_name: str, reason: str) -> Callable:

###

def skip_on_sstsimulator_conf_empty_str(section: str, key: str, reason: str) -> Callable:
def skip_on_sstsimulator_conf_empty_str(section: str, key: str, reason: str) -> Callable[[_FT], _FT]:
""" Skip a test if a section/key in the sstsimulator.conf file is missing an
entry
Expand Down Expand Up @@ -1098,7 +1102,7 @@ def testing_stat_output_diff(
ignore_lines: List[str] = [],
tol_stats: Mapping[str, float] = {},
new_stats: bool = False,
) -> Tuple[bool, List, List]:
) -> Tuple[bool, List[List[Union[str, int, float]]], List[List[str]]]:
""" Perform a diff of statistic outputs with special handling based on arguments
This diff is not sensitive to line ordering
Expand Down

0 comments on commit 95243e8

Please sign in to comment.