Revert "Show deprecation message when running under Python 2.7 and 3.4"

This reverts commit eb92e57509.
This commit is contained in:
Bruno Oliveira
2019-02-12 10:39:25 -02:00
parent 31c948184a
commit b41632e9a8
3 changed files with 1 additions and 37 deletions

View File

@@ -854,9 +854,7 @@ class TestDurations(object):
result = testdir.runpytest("--durations=2")
assert result.ret == 0
lines = result.stdout.get_lines_after("*slowest*durations*")
# account for the "deprecated python version" header
index = 2 if sys.version_info[:2] > (3, 4) else 6
assert "4 passed" in lines[index]
assert "4 passed" in lines[2]
def test_calls_showall(self, testdir):
testdir.makepyfile(self.source)

View File

@@ -3,7 +3,6 @@ from __future__ import division
from __future__ import print_function
import os
import sys
import pytest
from _pytest.warning_types import PytestDeprecationWarning
@@ -223,24 +222,6 @@ def test_fixture_named_request(testdir):
)
def test_python_deprecation(testdir):
result = testdir.runpytest()
python_ver = ".".join(str(x) for x in sys.version_info[:3])
msg = "You are using Python {}, which will no longer be supported in pytest 5.0".format(
python_ver
)
if sys.version_info[:2] <= (3, 4):
result.stdout.fnmatch_lines(
[
msg,
"For more information, please read:",
" https://docs.pytest.org/en/latest/py27-py34-deprecation.html",
]
)
else:
assert msg not in result.stdout.str()
def test_pytest_warns_unknown_kwargs():
with pytest.warns(
PytestDeprecationWarning,