Strange details item reprs on skipped tests in babune

Bug #625583 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Unassigned
testtools
Fix Released
Undecided
Martin Packman

Bug Description

Skipped tests appear in the babune output logs on Python 2.7 labelled not as 'ok' but instead 'skipped <repr-of-testtools-details>'.

This is understandable, though ugly, when it's the 'reason' attachment being output:

bzrlib.tests.per_branch.test_branch.TestReferenceLocation.test_sprout_copies_reference_location(RemoteBranchFormat-default) (subunit.RemotedTestCase)
bzrlib.tests.per_branch.test_branch.TestReferenceLocation.test_sprout_copies_reference_location(RemoteBranchFormat-default) ... skipped u'Text attachment: reason\n------------\nBranch cannot hold references.\n------------\n'

But some tests instead have the 'log':

bzrlib.tests.per_branch.test_locking.TestBranchLocking.test_lock_write_with_nonmatching_token(BranchReferenceFormat) (subunit.RemotedTestCase)
bzrlib.tests.per_branch.test_locking.TestBranchLocking.test_lock_write_with_nonmatching_token(BranchReferenceFormat) ... skipped u"Text attachment: log\n------------\n57.587 creating repository in file:///tmp/testbzr-QuHQFd.tmp/bzrlib.tests.per_branch.test_locking.TestBranchLocking.test_lock_write_with_nonmatching_token%28BranchReferenceFormat%29/work/b/.bzr/.\n57.591 opening working tree '/tmp/testbzr-QuHQFd.tmp'\n------------\nText attachment: reason\n------------\nUninitializable branch format\n------------\n"

This is likely down to testtools using the new skip handling in the Python 2.7 unittest, but I'm not sure if the bug needs fixing in bzr, or testtools, or subunit.

Related branches

Martin Packman (gz)
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 625583] [NEW] Strange details item reprs on skipped tests in babune

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/27/2010 6:05 PM, Martin [gz] wrote:
> Public bug reported:
>
> Skipped tests appear in the babune output logs on Python 2.7 labelled
> not as 'ok' but instead 'skipped <repr-of-testtools-details>'.
>
> This is understandable, though ugly, when it's the 'reason' attachment
> being output:
>
> bzrlib.tests.per_branch.test_branch.TestReferenceLocation.test_sprout_copies_reference_location(RemoteBranchFormat-default) (subunit.RemotedTestCase)
> bzrlib.tests.per_branch.test_branch.TestReferenceLocation.test_sprout_copies_reference_location(RemoteBranchFormat-default) ... skipped u'Text attachment: reason\n------------\nBranch cannot hold references.\n------------\n'
>
> But some tests instead have the 'log':
>
> bzrlib.tests.per_branch.test_locking.TestBranchLocking.test_lock_write_with_nonmatching_token(BranchReferenceFormat) (subunit.RemotedTestCase)
> bzrlib.tests.per_branch.test_locking.TestBranchLocking.test_lock_write_with_nonmatching_token(BranchReferenceFormat) ... skipped u"Text attachment: log\n------------\n57.587 creating repository in file:///tmp/testbzr-QuHQFd.tmp/bzrlib.tests.per_branch.test_locking.TestBranchLocking.test_lock_write_with_nonmatching_token%28BranchReferenceFormat%29/work/b/.bzr/.\n57.591 opening working tree '/tmp/testbzr-QuHQFd.tmp'\n------------\nText attachment: reason\n------------\nUninitializable branch format\n------------\n"
>
> This is likely down to testtools using the new skip handling in the
> Python 2.7 unittest, but I'm not sure if the bug needs fixing in bzr, or
> testtools, or subunit.

I mentioned this as part of my 'remove log from skips' branch, but we
might implement 'details' on bzr's addSkip method and then shrink the
reason way down.

That way, instead of formatting everything into the reason, we could do
just what we wanted (namely, the 'reason' detail).

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx7t/oACgkQJdeBCYSNAAOEIwCdGnt6rPdDGkY4V7jRJvo90EU7
WCoAn1CB3jlVch2RoR/ZN8iV4OW5kppF
=5V7h
-----END PGP SIGNATURE-----

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

This can get blamed on any of bzr, subunit, or testtools, but there's an easy fix in the last of those so I'll tackle it there.

Changed in testtools:
assignee: nobody → Martin [gz] (gz)
status: New → In Progress
Martin Packman (gz)
Changed in testtools:
status: In Progress → Fix Committed
Jonathan Lange (jml)
Changed in testtools:
milestone: none → 0.9.7
Jonathan Lange (jml)
Changed in testtools:
status: Fix Committed → Fix Released
Martin Packman (gz)
tags: added: python27
removed: python2.7
Revision history for this message
Martin Packman (gz) wrote :

Fixed on babune by testtools upgrade, as can be seen since the natty builder was added:
<http://babune.ladeuil.net:24842/job/selftest-natty/7/>

The output is now much less confusing:

bzrlib.tests.blackbox.test_dpush.TestDpushStrictWithChanges.test_push_with_revision(uncommitted) ... skipped u'dpush does not handle --revision\n'

Changed in bzr:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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