Coverage for tests/utils.py: 100%
11 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-04-14 00:18 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2025-04-14 00:18 +0000
1import sys 1defghiabc
2from os import getenv 1defghiabc
4import pytest 1defghiabc
6try: 1defghiabc
7 import shellingham 1defghiabc
8 from shellingham import ShellDetectionFailure 1defghiabc
10 shell = shellingham.detect_shell()[0] 1defghiabc
11except ImportError: # pragma: no cover 1abc
12 shellingham = None
13 shell = None
14except ShellDetectionFailure: # pragma: no cover 1abc
15 shell = None 1abc
18needs_py310 = pytest.mark.skipif( 1defghiabc
19 sys.version_info < (3, 10), reason="requires python3.10+"
20)
22needs_linux = pytest.mark.skipif( 1defghiabc
23 not sys.platform.startswith("linux"), reason="Test requires Linux"
24)
26needs_bash = pytest.mark.skipif( 1defghiabc
27 not shellingham or not shell or "bash" not in shell, reason="Test requires Bash"
28)
30requires_completion_permission = pytest.mark.skipif( 1defghiabc
31 not getenv("_TYPER_RUN_INSTALL_COMPLETION_TESTS", False),
32 reason="Test requires permission to run completion installation tests",
33)