Skip to content

Commit fa75d81

Browse files
authored
pytester: spawn: skip without pexpect.spawn (#5736)
pytester: spawn: skip without pexpect.spawn
2 parents a24132d + 1434b66 commit fa75d81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/_pytest/pytester.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,8 @@ def spawn(self, cmd, expect_timeout=10.0):
11881188
pytest.skip("pypy-64 bit not supported")
11891189
if sys.platform.startswith("freebsd"):
11901190
pytest.xfail("pexpect does not work reliably on freebsd")
1191+
if not hasattr(pexpect, "spawn"):
1192+
pytest.skip("pexpect.spawn not available")
11911193
logfile = self.tmpdir.join("spawn.out").open("wb")
11921194

11931195
# Do not load user config.

0 commit comments

Comments
 (0)