Merge pull request #7526 from bluetech/win-bash-2

testing: improve bash check
This commit is contained in:
Bruno Oliveira 2020-07-21 23:02:05 -03:00 committed by GitHub
commit 2a8dcc9728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -292,10 +292,11 @@ def test_argcomplete(testdir, monkeypatch) -> None:
bash_version = subprocess.run(
["bash", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stderr=subprocess.DEVNULL,
check=True,
universal_newlines=True,
).stdout
except OSError:
except (OSError, subprocess.CalledProcessError):
pytest.skip("bash is not available")
if "GNU bash" not in bash_version:
# See #7518.