testing: improve bash check
This commit is contained in:
parent
2294f109b6
commit
0709305953
|
@ -292,10 +292,11 @@ def test_argcomplete(testdir, monkeypatch) -> None:
|
||||||
bash_version = subprocess.run(
|
bash_version = subprocess.run(
|
||||||
["bash", "--version"],
|
["bash", "--version"],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.DEVNULL,
|
||||||
|
check=True,
|
||||||
universal_newlines=True,
|
universal_newlines=True,
|
||||||
).stdout
|
).stdout
|
||||||
except OSError:
|
except (OSError, subprocess.CalledProcessError):
|
||||||
pytest.skip("bash is not available")
|
pytest.skip("bash is not available")
|
||||||
if "GNU bash" not in bash_version:
|
if "GNU bash" not in bash_version:
|
||||||
# See #7518.
|
# See #7518.
|
||||||
|
|
Loading…
Reference in New Issue