text failure report is too gassy

Bug #660852 reported by Martin Pool
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Wishlist
Jonathan Lange

Bug Description

A typical testtools bzr failure is

======================================================================
ERROR: bzrlib.plugins.launchpad.test_lp_directory.TestDebuntuExpansions.test_ubuntu_natty_distroseries_expansion
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
 File "/usr/lib/python2.4/site-packages/testtools/runtest.py", line 128, in _run_user
   return fn(*args)
 File "/usr/lib/python2.4/site-packages/testtools/testcase.py", line 368, in _run_test_method
   testMethod()
 File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/plugins/launchpad/test_lp_directory.py", line 423, in test_ubuntu_natty_distroseries_expansion
   self.assertURL('ubuntu/natty/foo', 'ubuntu:natty/foo', series='natty')
 File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/plugins/launchpad/test_lp_directory.py", line 383, in assertURL
   self.directory._resolve(shortcut, factory))
 File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/plugins/launchpad/lp_directory.py", line 77, in _resolve
   if result.scheme in ('ubuntu', 'debianlp'):
AttributeError: 'tuple' object has no attribute 'scheme'
------------

----------------------------------------------------------------------

There is a lot of unnecessary padding here.
 * if the attachment's empty, don't show it (perhaps bzr should not attach it)
 * obviously it's a traceback, you don't need to tell me
 * the dashes and blanks are a bit excessive

Related branches

Revision history for this message
Martin Packman (gz) wrote :

I agree with these comments, plus the top two levels of the traceback aren't needed.

Fixing this just in bzrlib is on my todo list along with bug 625597 but making the default testtools output more concise would also be good.

Changed in testtools:
status: New → Confirmed
Jonathan Lange (jml)
Changed in testtools:
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
Robert Collins (lifeless) wrote :

An empty attachment is important for some projects; if bzr doesn't want it, it shouldn't attach it. (OTOH I think that that attachment has a single blank line : its not empty).

There can be many tracebacks - -0, -1, -2 etc (occurs when server threads blow up, or cleanups error). If you genuinely don't want to see the attachment label for the attachment called traceback, I guess we could do that but it seems counter productive to me.

As for the = and -, patches appreciated.

Changed in testtools:
importance: Low → Wishlist
Revision history for this message
Jonathan Lange (jml) wrote :

The blank lines are gone in trunk, fwiw.

Jonathan Lange (jml)
Changed in testtools:
status: Triaged → In Progress
assignee: nobody → Jonathan Lange (jml)
Revision history for this message
Jonathan Lange (jml) wrote :

As my patch communicates, I agree with Martin that the first attachment – the primary traceback – should be without the attachment label.

Revision history for this message
Martin Pool (mbp) wrote :

here's an example subunit output from bzr; thanks for tackling this

Jonathan Lange (jml)
Changed in testtools:
status: In Progress → Fix Committed
milestone: none → next
Jonathan Lange (jml)
tags: added: over-verbosity
Jonathan Lange (jml)
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.