Coverage for tests/utils.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 18:26 +0000

1import sys 1defghabc

2 

3import pytest 1defghabc

4 

5try: 1defghabc

6 import shellingham 1defghabc

7 from shellingham import ShellDetectionFailure 1defghabc

8 

9 shell = shellingham.detect_shell()[0] 1defghabc

10except ImportError: # pragma: no cover 1abc

11 shellingham = None 

12 shell = None 

13except ShellDetectionFailure: # pragma: no cover 1abc

14 shell = None 1abc

15 

16 

17needs_py310 = pytest.mark.skipif( 1defghabc

18 sys.version_info < (3, 10), reason="requires python3.10+" 

19) 

20 

21needs_linux = pytest.mark.skipif( 1defghabc

22 not sys.platform.startswith("linux"), reason="Test requires Linux" 

23) 

24 

25needs_bash = pytest.mark.skipif( 1defghabc

26 not shellingham or not shell or "bash" not in shell, reason="Test requires Bash" 

27)