Fix warnings transfer between workers and master node with pytest >= 3.8

Fix #341
This commit is contained in:
Bruno Oliveira
2018-09-24 14:58:13 -03:00
parent ed2ab76b5c
commit 78030e3d32
8 changed files with 97 additions and 3 deletions

View File

@@ -402,7 +402,7 @@ class TestTerminalReporting:
@pytest.mark.parametrize("n", ["-n0", "-n1"])
@pytest.mark.parametrize("warn_type", ["pytest", "builtin"])
def test_logwarning(self, testdir, n, warn_type):
def test_warnings(self, testdir, n, warn_type):
from pkg_resources import parse_version
if parse_version(pytest.__version__) < parse_version("3.1"):
@@ -417,7 +417,9 @@ class TestTerminalReporting:
assert False
testdir.makepyfile(
"""
import warnings, py
import warnings, py, pytest
@pytest.mark.filterwarnings('ignore:config.warn has been deprecated')
def test_func(request):
{warn_code}
""".format(