Drop support to old pytest versions and test with python 3.7

This commit is contained in:
Bruno Oliveira
2018-11-10 19:31:38 -02:00
parent 74a5e0ca03
commit f9a13fe53b
8 changed files with 35 additions and 54 deletions

View File

@@ -1,4 +1,7 @@
import py
import pytest
from pkg_resources import parse_version
from xdist.looponfail import RemoteControl
from xdist.looponfail import StatRecorder
@@ -214,7 +217,11 @@ class TestLooponFailing:
assert "test_one" not in remotecontrol.failures[0]
assert "test_two" in remotecontrol.failures[0]
@py.test.mark.xfail(py.test.__version__ >= "3.1", reason="broken by pytest 3.1+")
@pytest.mark.xfail(
parse_version(pytest.__version__) >= parse_version("3.1"),
reason="broken by pytest 3.1+",
strict=True,
)
def test_looponfail_removed_test(self, testdir):
modcol = testdir.getmodulecol(
"""