Author: Ronan Lamy <[email protected]>
Branch: py3tests
Changeset: r94082:bc7db4a511cc
Date: 2018-03-22 16:51 +0100
http://bitbucket.org/pypy/pypy/changeset/bc7db4a511cc/

Log:    Implement AppTestFunction.reportinfo() to get correct failure
        reports

diff --git a/pypy/tool/pytest/apptest2.py b/pypy/tool/pytest/apptest2.py
--- a/pypy/tool/pytest/apptest2.py
+++ b/pypy/tool/pytest/apptest2.py
@@ -94,3 +94,8 @@
             if appexcinfo.traceback:
                 raise AppError, AppError(appexcinfo), tb
             raise
+
+    def reportinfo(self):
+        """Must return a triple (fspath, lineno, test_name)"""
+        lineno = self.w_obj.code.co_firstlineno
+        return self.parent.fspath, lineno, self.w_obj.name
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to