summaryrefslogtreecommitdiff
path: root/testing/code
diff options
context:
space:
mode:
authorhugovk <hugovk@users.noreply.github.com>2017-10-10 08:54:56 +0300
committerhugovk <hugovk@users.noreply.github.com>2017-10-10 08:54:56 +0300
commitef732fc51d9d2ace3166cbbad21a608a3d4bfc4d (patch)
tree21e3875eed985154983775c28388ed8a465683fa /testing/code
parentdd45f8ba6c68936f0c186b5b094d9843c76de772 (diff)
downloadpytest-ef732fc51d9d2ace3166cbbad21a608a3d4bfc4d.tar.gz
Remove code for unsupported Python versions
Diffstat (limited to 'testing/code')
-rw-r--r--testing/code/test_excinfo.py10
-rw-r--r--testing/code/test_source.py2
2 files changed, 2 insertions, 10 deletions
diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py
index f8f8a0365..f7f6123a2 100644
--- a/testing/code/test_excinfo.py
+++ b/testing/code/test_excinfo.py
@@ -345,10 +345,7 @@ def test_excinfo_no_sourcecode():
except ValueError:
excinfo = _pytest._code.ExceptionInfo()
s = str(excinfo.traceback[-1])
- if py.std.sys.version_info < (2, 5):
- assert s == " File '<string>':1 in ?\n ???\n"
- else:
- assert s == " File '<string>':1 in <module>\n ???\n"
+ assert s == " File '<string>':1 in <module>\n ???\n"
def test_excinfo_no_python_sourcecode(tmpdir):
@@ -1244,9 +1241,6 @@ def test_no_recursion_index_on_recursion_error():
except:
from _pytest._code.code import ExceptionInfo
exc_info = ExceptionInfo()
- if sys.version_info[:2] == (2, 6):
- assert "'RecursionDepthError' object has no attribute '___" in str(exc_info.getrepr())
- else:
- assert 'maximum recursion' in str(exc_info.getrepr())
+ assert 'maximum recursion' in str(exc_info.getrepr())
else:
assert 0
diff --git a/testing/code/test_source.py b/testing/code/test_source.py
index 1d315aa9b..ed45f0896 100644
--- a/testing/code/test_source.py
+++ b/testing/code/test_source.py
@@ -273,7 +273,6 @@ class TestSourceParsingAndCompiling(object):
assert getstatement(2, source).lines == source.lines[2:3]
assert getstatement(3, source).lines == source.lines[3:4]
- @pytest.mark.skipif("sys.version_info < (2,6)")
def test_getstatementrange_out_of_bounds_py3(self):
source = Source("if xxx:\n from .collections import something")
r = source.getstatementrange(1)
@@ -283,7 +282,6 @@ class TestSourceParsingAndCompiling(object):
source = Source(":")
pytest.raises(SyntaxError, lambda: source.getstatementrange(0))
- @pytest.mark.skipif("sys.version_info < (2,6)")
def test_compile_to_ast(self):
import ast
source = Source("x = 4")