tests: pdb: flush also on MacOS, but read() before

Ref: https://github.com/pytest-dev/pytest/issues/2022
This commit is contained in:
Daniel Hahler 2019-05-27 03:00:32 +02:00
parent f0a4a13e48
commit 8e51563384
1 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,6 @@ from __future__ import division
from __future__ import print_function
import os
import platform
import sys
import six
@ -153,10 +152,11 @@ class TestPDB(object):
@staticmethod
def flush(child):
if platform.system() == "Darwin":
return
if child.isalive():
# Read if the test has not (e.g. test_pdb_unittest_skip).
child.read()
child.wait()
assert not child.isalive()
def test_pdb_unittest_postmortem(self, testdir):
p1 = testdir.makepyfile(