Skip to content

Commit 21e4825

Browse files
committed
tests/xen/test_xtf: add type hints
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
1 parent 7cfb978 commit 21e4825

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/xen/test_xtf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import logging
44

55
from lib.commands import SSHCommandFailed
6+
from lib.host import Host
7+
8+
from typing import List
69

710
# Requirements:
811
# From --hosts parameter:
@@ -11,7 +14,7 @@
1114

1215
@pytest.mark.usefixtures("host_with_hvm_fep", "host_with_dynamically_disabled_ept_sp")
1316
class TestXtf:
14-
_common_skips = [
17+
_common_skips: List[str] = [
1518
# UMIP requires hardware support, that is a recent enough CPU
1619
'test-hvm32-umip',
1720
'test-hvm64-umip',
@@ -24,18 +27,18 @@ class TestXtf:
2427
'test-pv64-xsa-444',
2528
]
2629

27-
def _extract_skipped_tests(self, output):
30+
def _extract_skipped_tests(self, output: str) -> List[str]:
2831
skipped_tests = []
2932
for line in output.splitlines():
3033
if line.endswith(' SKIP'):
3134
skipped_tests.append(line.split()[0])
3235
return skipped_tests
3336

34-
def test_self(self, host, xtf_runner):
37+
def test_self(self, host: Host, xtf_runner: str) -> None:
3538
logging.info("Running selftest...")
3639
host.ssh(f'{xtf_runner} selftest -q --host')
3740

38-
def test_all(self, host, xtf_runner):
41+
def test_all(self, host: Host, xtf_runner: str) -> None:
3942
logging.info("Running tests...")
4043
try:
4144
host.ssh(f'{xtf_runner} -aqq --host')

0 commit comments

Comments
 (0)