tests: pdb: flush also on MacOS, but read() before
Ref: https://github.com/pytest-dev/pytest/issues/2022
This commit is contained in:
parent
f0a4a13e48
commit
8e51563384
|
@ -4,7 +4,6 @@ from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
@ -153,10 +152,11 @@ class TestPDB(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def flush(child):
|
def flush(child):
|
||||||
if platform.system() == "Darwin":
|
|
||||||
return
|
|
||||||
if child.isalive():
|
if child.isalive():
|
||||||
|
# Read if the test has not (e.g. test_pdb_unittest_skip).
|
||||||
|
child.read()
|
||||||
child.wait()
|
child.wait()
|
||||||
|
assert not child.isalive()
|
||||||
|
|
||||||
def test_pdb_unittest_postmortem(self, testdir):
|
def test_pdb_unittest_postmortem(self, testdir):
|
||||||
p1 = testdir.makepyfile(
|
p1 = testdir.makepyfile(
|
||||||
|
|
Loading…
Reference in New Issue