utils.py
This file
Path
tests/utils.py
27 lines · 624 bytes · Python
Last changed by
✅ Add `needs_bash` test fixture (#888)Sofie Van Landeghembefore adoptiona5b7557
History of this fileTake it
The walk stopped after 200 commits: lines older than d857cbb point at it.
📝 Update release notesSebastián Ramírezbefore adoptiond857cbb
lines 1–4why, one step back1import sys23import pytest4✅ Add `needs_bash` test fixture (#888)Sofie Van Landeghembefore adoptiona5b7557
lines 5–16why, one step back5try:6 import shellingham7 from shellingham import ShellDetectionFailure89 shell = shellingham.detect_shell()[0]10except ImportError: # pragma: no cover11 shellingham = None12 shell = None13except ShellDetectionFailure: # pragma: no cover14 shell = None1516📝 Update release notesSebastián Ramírezbefore adoptiond857cbb
lines 17–19why, one step back17needs_py310 = pytest.mark.skipif(18 sys.version_info < (3, 10), reason="requires python3.10+"19)✅ Add CI configs to run tests on Windows and MacOS (#824)Sofie Van Landeghembefore adoptionb751a13
lines 20–22why, one step back2021needs_linux = pytest.mark.skipif(22 not sys.platform.startswith("linux"), reason="Test requires Linux"✅ Add `needs_bash` test fixture (#888)Sofie Van Landeghembefore adoptiona5b7557
lines 23–26why, one step back23)2425needs_bash = pytest.mark.skipif(26 not shellingham or not shell or "bash" not in shell, reason="Test requires Bash"✅ Add CI configs to run tests on Windows and MacOS (#824)Sofie Van Landeghembefore adoptionb751a13
line 27why, one step back27)