File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66from docs_src .commands .index import tutorial001 as mod
77
8- from ..utils import needs_linux
8+ from ..utils import needs_bash , needs_linux
99
1010
11+ @needs_bash
1112@needs_linux
1213def test_show_completion ():
1314 result = subprocess .run (
@@ -23,6 +24,7 @@ def test_show_completion():
2324 assert "_TUTORIAL001.PY_COMPLETE=complete_bash" in result .stdout
2425
2526
27+ @needs_bash
2628@needs_linux
2729def test_install_completion ():
2830 bash_completion_path : Path = Path .home () / ".bashrc"
Original file line number Diff line number Diff line change 22
33import pytest
44
5+ try :
6+ import shellingham
7+ from shellingham import ShellDetectionFailure
8+
9+ shell = shellingham .detect_shell ()[0 ]
10+ except ImportError : # pragma: no cover
11+ shellingham = None
12+ shell = None
13+ except ShellDetectionFailure : # pragma: no cover
14+ shell = None
15+
16+
517needs_py310 = pytest .mark .skipif (
618 sys .version_info < (3 , 10 ), reason = "requires python3.10+"
719)
820
921needs_linux = pytest .mark .skipif (
1022 not sys .platform .startswith ("linux" ), reason = "Test requires Linux"
1123)
24+
25+ needs_bash = pytest .mark .skipif (
26+ not shellingham or not shell or "bash" not in shell , reason = "Test requires Bash"
27+ )
You can’t perform that action at this time.
0 commit comments