Skip to content

Commit 3a53c83

Browse files
committed
feat: typing
1 parent ca87253 commit 3a53c83

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tests/conftest.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from pathlib import Path
2727
from shutil import get_terminal_size
2828
from sys import platform
29+
from typing import Literal, Union
2930
from unittest.mock import patch
3031

3132
from _pytest.terminal import TerminalReporter # for terminal customization
@@ -124,8 +125,27 @@
124125
reason="This tests does not work on student version.",
125126
)
126127

128+
_REQUIRES_ARG = Union[
129+
Literal[
130+
"GRPC",
131+
"DPF",
132+
"LOCAL",
133+
"REMOTE",
134+
"CICD",
135+
"NOCICD",
136+
"XSERVER",
137+
"LINUX",
138+
"NOLINUX",
139+
"WINDOWS",
140+
"NOWINDOWS",
141+
"NOSTUDENT",
142+
"CONSOLE",
143+
],
144+
str,
145+
]
146+
127147

128-
def requires(requirement: str):
148+
def requires(requirement: _REQUIRES_ARG):
129149
"""Check requirements"""
130150
requirement = requirement.lower()
131151

0 commit comments

Comments
 (0)