From 8e51563384d5f955e0c3db363f2b498e77d14c22 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 27 May 2019 03:00:32 +0200 Subject: [PATCH] tests: pdb: flush also on MacOS, but read() before Ref: https://github.com/pytest-dev/pytest/issues/2022 --- testing/test_pdb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/test_pdb.py b/testing/test_pdb.py index 007423a9e..119c2542d 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -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(