Skip to content
Myr

utils.py

This file

Path

tests/utils.py

23 lines 路 634 bytes 路 Python

Last changed by

鈾伙笍 Refactor the handling of `shellingham` (#1347)Nathan McDougallbefore adoptionfd4241f

History of this file

Take it

1import sys2from os import getenv34import pytest5from typer._completion_shared import _get_shell_name67needs_py310 = pytest.mark.skipif(8    sys.version_info < (3, 10), reason="requires python3.10+"9)1011needs_linux = pytest.mark.skipif(12    not sys.platform.startswith("linux"), reason="Test requires Linux"13)1415shell = _get_shell_name()16needs_bash = pytest.mark.skipif(17    shell is None or "bash" not in shell, reason="Test requires Bash"18)1920requires_completion_permission = pytest.mark.skipif(21    not getenv("_TYPER_RUN_INSTALL_COMPLETION_TESTS", False),22    reason="Test requires permission to run completion installation tests",23)