From f2c01c5407f3c7853bdd463b8aa2856e3a6398e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Oct 2016 12:36:42 -0400 Subject: [PATCH] Restore pexpect tests and bypass isalive/wait on macOS. Ref #2022. --- _pytest/pytester.py | 2 -- testing/test_pdb.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/_pytest/pytester.py b/_pytest/pytester.py index 651160cc7..a8bb39794 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -1002,8 +1002,6 @@ class Testdir: pexpect = pytest.importorskip("pexpect", "3.0") if hasattr(sys, 'pypy_version_info') and '64' in platform.machine(): pytest.skip("pypy-64 bit not supported") - if sys.platform == "darwin": - pytest.xfail("pexpect does not work reliably on darwin?!") if sys.platform.startswith("freebsd"): pytest.xfail("pexpect does not work reliably on freebsd") logfile = self.tmpdir.join("spawn.out").open("wb") diff --git a/testing/test_pdb.py b/testing/test_pdb.py index 062ae1fb9..b22f5128e 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -1,4 +1,5 @@ import sys +import platform import _pytest._code import pytest @@ -80,6 +81,8 @@ class TestPDB: @staticmethod def flush(child): + if platform.system() == 'Darwin': + return if child.isalive(): child.wait()