[py-svn] r8171 - py/dist/py/test/report/text
hpk at codespeak.net
hpk at codespeak.net
Sat Jan 8 17:03:38 CET 2005
Author: hpk
Date: Sat Jan 8 17:03:38 2005
New Revision: 8171
Modified:
py/dist/py/test/report/text/summary.py
Log:
handle non-existing source code more gracefully
Modified: py/dist/py/test/report/text/summary.py
==============================================================================
--- py/dist/py/test/report/text/summary.py (original)
+++ py/dist/py/test/report/text/summary.py Sat Jan 8 17:03:38 2005
@@ -106,8 +106,9 @@
def repr_source(self, tb):
# represent source code for a given traceback entry
self.out.line()
- source = tb.frame.code.fullsource
- if not source:
+ try:
+ source = tb.frame.code.fullsource
+ except py.error.ENOENT:
self.out.line("failure to get at sourcelines from %r" % tb)
#self.out.line("(co_filename = %r)" % (frame.f_code.co_filename))
#self.out.line("(f_lineno = %r)" % (frame.f_lineno))
More information about the pytest-commit
mailing list