File tree 3 files changed +5
-9
lines changed 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 20
20
include :
21
21
# OSX tests - first (in test stage), since they are the slower ones.
22
22
- &test-macos
23
- # NOTE: (tests with) pexpect appear to be buggy on Travis,
24
- # at least with coverage.
25
- # Log: https://travis-ci.org/pytest-dev/pytest/jobs/500358864
26
23
os : osx
27
24
osx_image : xcode10.1
28
25
language : generic
33
30
- python -V
34
31
- test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 27
35
32
- << : *test-macos
36
- env : TOXENV=py37-xdist
33
+ env : TOXENV=py37-pexpect,py37- xdist PYTEST_COVERAGE=1
37
34
before_install :
38
35
- which python3
39
36
- python3 -V
Original file line number Diff line number Diff line change 4
4
from __future__ import print_function
5
5
6
6
import os
7
- import platform
8
7
import sys
9
8
10
9
import six
@@ -153,10 +152,11 @@ def test_func():
153
152
154
153
@staticmethod
155
154
def flush (child ):
156
- if platform .system () == "Darwin" :
157
- return
158
155
if child .isalive ():
156
+ # Read if the test has not (e.g. test_pdb_unittest_skip).
157
+ child .read ()
159
158
child .wait ()
159
+ assert not child .isalive ()
160
160
161
161
def test_pdb_unittest_postmortem (self , testdir ):
162
162
p1 = testdir .makepyfile (
@@ -797,7 +797,6 @@ def test_post_mortem():
797
797
rest = child .read ().decode ("utf8" )
798
798
assert "leave_pdb_hook" in rest
799
799
assert "1 failed" in rest
800
- child .sendeof ()
801
800
self .flush (child )
802
801
803
802
def test_pdb_custom_cls (self , testdir , custom_pdb_calls ):
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ setenv =
40
40
lsof: _PYTEST_TOX_POSARGS_LSOF =--lsof
41
41
42
42
pexpect: _PYTEST_TOX_PLATFORM =linux|darwin
43
- pexpect: _PYTEST_TOX_POSARGS_PEXPECT =testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py
43
+ pexpect: _PYTEST_TOX_POSARGS_PEXPECT =-m uses_pexpect
44
44
45
45
twisted: _PYTEST_TOX_POSARGS_TWISTED =testing/test_unittest.py
46
46
You can’t perform that action at this time.
0 commit comments