Merge remote-tracking branch 'upstream/master' into merge-master-into-features

This commit is contained in:
Bruno Oliveira
2019-01-29 19:36:56 -02:00
48 changed files with 468 additions and 144 deletions

View File

@@ -18,6 +18,7 @@ import six
from six import text_type
import _pytest
from _pytest._io.saferepr import saferepr
from _pytest.compat import _PY2
from _pytest.compat import _PY3
from _pytest.compat import PY35
@@ -142,7 +143,7 @@ class Frame(object):
def repr(self, object):
""" return a 'safe' (non-recursive, one-line) string repr for 'object'
"""
return py.io.saferepr(object)
return saferepr(object)
def is_true(self, object):
return object
@@ -421,7 +422,7 @@ class ExceptionInfo(object):
if exprinfo is None and isinstance(tup[1], AssertionError):
exprinfo = getattr(tup[1], "msg", None)
if exprinfo is None:
exprinfo = py.io.saferepr(tup[1])
exprinfo = saferepr(tup[1])
if exprinfo and exprinfo.startswith(cls._assert_start_repr):
_striptext = "AssertionError: "
@@ -618,7 +619,7 @@ class FormattedExcinfo(object):
return source
def _saferepr(self, obj):
return py.io.saferepr(obj)
return saferepr(obj)
def repr_args(self, entry):
if self.funcargs: