pytester: spawn: skip without pexpect.spawn (#5736)

pytester: spawn: skip without pexpect.spawn
This commit is contained in:
Bruno Oliveira 2019-08-14 18:06:06 -03:00 committed by GitHub
commit fa75d818cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1188,6 +1188,8 @@ class Testdir:
pytest.skip("pypy-64 bit not supported") pytest.skip("pypy-64 bit not supported")
if sys.platform.startswith("freebsd"): if sys.platform.startswith("freebsd"):
pytest.xfail("pexpect does not work reliably on freebsd") pytest.xfail("pexpect does not work reliably on freebsd")
if not hasattr(pexpect, "spawn"):
pytest.skip("pexpect.spawn not available")
logfile = self.tmpdir.join("spawn.out").open("wb") logfile = self.tmpdir.join("spawn.out").open("wb")
# Do not load user config. # Do not load user config.