Skip to content
Myr

utils.py

This file

Path

tests/utils.py

33 lines · 840 bytes · Python

Last changed by

✅ Only run completion installation tests when the env var `_TYPER_RUN_INSTALL_COMPLETION_TESTS` is set (#995)Sofie Van Landeghembefore adoption9f9047d

History of this file

Take it

The walk stopped after 200 commits: lines older than 4bf340a point at it.

⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.9.0 (#865)dependabot[bot]before adoption4bf340a

line 1why, one step back
1import sys

✅ Only run completion installation tests when the env var `_TYPER_RUN_INSTALL_COMPLETION_TESTS` is set (#995)Sofie Van Landeghembefore adoption9f9047d

line 2why, one step back
2from os import getenv

⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.9.0 (#865)dependabot[bot]before adoption4bf340a

lines 3–5why, one step back
3
4import pytest5

✅ Add `needs_bash` test fixture (#888)Sofie Van Landeghembefore adoptiona5b7557

lines 6–17why, one step back
6try:
7 import shellingham8 from shellingham import ShellDetectionFailure910 shell = shellingham.detect_shell()[0]11except ImportError: # pragma: no cover12 shellingham = None13 shell = None14except ShellDetectionFailure: # pragma: no cover15 shell = None1617

⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.9.0 (#865)dependabot[bot]before adoption4bf340a

lines 18–23why, one step back
18needs_py310 = pytest.mark.skipif(
19 sys.version_info < (3, 10), reason="requires python3.10+"20)2122needs_linux = pytest.mark.skipif(23 not sys.platform.startswith("linux"), reason="Test requires Linux"

✅ Add `needs_bash` test fixture (#888)Sofie Van Landeghembefore adoptiona5b7557

lines 24–27why, one step back
24)
2526needs_bash = pytest.mark.skipif(27 not shellingham or not shell or "bash" not in shell, reason="Test requires Bash"

✅ Only run completion installation tests when the env var `_TYPER_RUN_INSTALL_COMPLETION_TESTS` is set (#995)Sofie Van Landeghembefore adoption9f9047d

lines 28–32why, one step back
28)
2930requires_completion_permission = pytest.mark.skipif(31 not getenv("_TYPER_RUN_INSTALL_COMPLETION_TESTS", False),32 reason="Test requires permission to run completion installation tests",

⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.9.0 (#865)dependabot[bot]before adoption4bf340a

line 33why, one step back
33)