Skip to content

Commit

Permalink
tests/runner: add missing type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Sep 11, 2024
1 parent 80e003a commit ea3c971
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ class Result:
expected: str
command: list[str]

def unordered_compare(out, expected):

def unordered_compare(out: str, expected: str) -> bool:
if out == expected:
return True

out_parts = out.split()
expected_parts = expected.split()
return sorted(out_parts) == sorted(expected_parts)


async def test(runner: str, case_: TestCase, libdir: str) -> Result:
cmd = [runner] + case_['args']
cmd.append(case_['cps'].replace('{prefix}', os.path.join(PREFIX, libdir, 'cps')))
Expand Down

0 comments on commit ea3c971

Please sign in to comment.