Skip to content

Commit 3be76c4

Browse files
committed
tests: pdb: flush also on MacOS, but read() before
Ref: pytest-dev#2022
1 parent 9db425e commit 3be76c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/test_pdb.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from __future__ import print_function
55

66
import os
7-
import platform
87
import sys
98

109
import six
@@ -153,10 +152,11 @@ def test_func():
153152

154153
@staticmethod
155154
def flush(child):
156-
if platform.system() == "Darwin":
157-
return
158155
if child.isalive():
156+
# Read if the test has not (e.g. test_pdb_unittest_skip).
157+
child.read()
159158
child.wait()
159+
assert not child.isalive()
160160

161161
def test_pdb_unittest_postmortem(self, testdir):
162162
p1 = testdir.makepyfile(

0 commit comments

Comments
 (0)