38
38
from typing import Any , Iterator , List , Optional , Sequence , Tuple , Union
39
39
40
40
# 3rd party
41
- import _pytest
42
- import pytest
43
- from _pytest .mark import MarkDecorator
41
+ import pytest # nodep
42
+ from _pytest .mark import MarkDecorator # nodep
44
43
45
44
# this package
46
45
from domdf_python_tools .doctools import PYPY
@@ -239,7 +238,7 @@ def _make_version(version: Union[str, float, Tuple[int, ...]]) -> Version:
239
238
def min_version (
240
239
version : Union [str , float , Tuple [int ]],
241
240
reason : Optional [str ] = None ,
242
- ) -> _pytest . mark . structures . MarkDecorator :
241
+ ) -> MarkDecorator :
243
242
"""
244
243
Factory function to return a ``@pytest.mark.skipif`` decorator that will
245
244
skip a test if the current Python version is less than the required one.
@@ -264,7 +263,7 @@ def min_version(
264
263
def max_version (
265
264
version : Union [str , float , Tuple [int ]],
266
265
reason : Optional [str ] = None ,
267
- ) -> _pytest . mark . structures . MarkDecorator :
266
+ ) -> MarkDecorator :
268
267
"""
269
268
Factory function to return a ``@pytest.mark.skipif`` decorator that will
270
269
skip a test if the current Python version is greater than the required one.
@@ -286,7 +285,7 @@ def max_version(
286
285
return pytest .mark .skipif (condition = sys .version_info [:3 ] > version_ , reason = reason )
287
286
288
287
289
- def not_windows (reason : str = "Not required on Windows." , ) -> _pytest . mark . structures . MarkDecorator :
288
+ def not_windows (reason : str = "Not required on Windows." , ) -> MarkDecorator :
290
289
"""
291
290
Factory function to return a ``@pytest.mark.skipif`` decorator that will
292
291
skip a test if the current platform is Windows.
@@ -301,7 +300,7 @@ def not_windows(reason: str = "Not required on Windows.", ) -> _pytest.mark.stru
301
300
return pytest .mark .skipif (condition = sys .platform == "win32" , reason = reason )
302
301
303
302
304
- def only_windows (reason : str = "Only required on Windows." , ) -> _pytest . mark . structures . MarkDecorator :
303
+ def only_windows (reason : str = "Only required on Windows." , ) -> MarkDecorator :
305
304
"""
306
305
Factory function to return a ``@pytest.mark.skipif`` decorator that will
307
306
skip a test if the current platform is **not** Windows.
@@ -316,7 +315,7 @@ def only_windows(reason: str = "Only required on Windows.", ) -> _pytest.mark.st
316
315
return pytest .mark .skipif (condition = sys .platform != "win32" , reason = reason )
317
316
318
317
319
- def not_pypy (reason : str = "Not required on PyPy." ) -> _pytest . mark . structures . MarkDecorator :
318
+ def not_pypy (reason : str = "Not required on PyPy." ) -> MarkDecorator :
320
319
"""
321
320
Factory function to return a ``@pytest.mark.skipif`` decorator that will
322
321
skip a test if the current Python implementation is PyPy.
@@ -331,7 +330,7 @@ def not_pypy(reason: str = "Not required on PyPy.") -> _pytest.mark.structures.M
331
330
return pytest .mark .skipif (condition = PYPY , reason = reason )
332
331
333
332
334
- def only_pypy (reason : str = "Only required on PyPy." ) -> _pytest . mark . structures . MarkDecorator :
333
+ def only_pypy (reason : str = "Only required on PyPy." ) -> MarkDecorator :
335
334
"""
336
335
Factory function to return a ``@pytest.mark.skipif`` decorator that will
337
336
skip a test if the current Python implementation is not PyPy.
0 commit comments