MultiTestResult does not support tags

Bug #914279 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned
testtools
Fix Released
Wishlist
Graham Binns

Bug Description

Really booyah

parent bug 914166

Tags: paralleltest
tags: added: paralleltest
Gary Poster (gary)
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
description: updated
Graham Binns (gmb)
Changed in testtools:
status: New → In Progress
assignee: nobody → Graham Binns (gmb)
status: In Progress → Fix Committed
Changed in launchpad:
status: Triaged → In Progress
Changed in testtools:
milestone: none → next
importance: Undecided → Wishlist
Revision history for this message
Jonathan Lange (jml) wrote :

The fix for this doesn't add any tests. (And there's also no merge proposal for me to comment on).

Revision history for this message
Jonathan Lange (jml) wrote :

Oh, and has been committed to the wrong branch. It's on lp:~testtools-dev/testtools/trunk rather than lp:testtools (aka lp:~testtools-committers/testtools/trunk).

Changed in testtools:
status: Fix Committed → In Progress
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 914279] Re: MultiTestResult does not support tags

On Wed, Jan 11, 2012 at 9:34 PM, Jonathan Lange <email address hidden> wrote:
> Oh, and has been committed to the wrong branch. It's on lp:~testtools-
> dev/testtools/trunk rather than lp:testtools (aka lp:~testtools-
> committers/testtools/trunk).

It has tests via the parameterised contract tests. The wrong branch I
will fix now (have I mentioned that the big pivot around branches
really screwed me up).

Revision history for this message
Jonathan Lange (jml) wrote :

On Wed, Jan 11, 2012 at 9:56 AM, Robert Collins
<email address hidden> wrote:
> On Wed, Jan 11, 2012 at 9:34 PM, Jonathan Lange <email address hidden> wrote:
>> Oh, and has been committed to the wrong branch. It's on lp:~testtools-
>> dev/testtools/trunk rather than lp:testtools (aka lp:~testtools-
>> committers/testtools/trunk).
>
> It has tests via the parameterised contract tests. The wrong branch I
> will fix now (have I mentioned that the big pivot around branches
> really screwed me up).

Those tests weren't failing before, so they are no good for preventing
regressions in this behaviour.

jml

Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, Jan 11, 2012 at 11:24 PM, Jonathan Lange <email address hidden> wrote:
> Those tests weren't failing before, so they are no good for preventing
> regressions in this behaviour.

Those tests didn't exist before.

+ def test_tags(self):
+ # tags() does not fail the test run.
+ result = self.makeResult()
+ result.startTest(self)
+ result.tags(set([]), set([]))
...
+ def test_tags(self):
+ # Calling `tags` on a `MultiTestResult` calls `tags` on all its
+ # `TestResult`s.
+ added_tags = set(['foo', 'bar'])
+ removed_tags = set(['eggs'])
+ self.multiResult.tags(added_tags, removed_tags)
+ self.assertResultLogsEqual([('tags', added_tags, removed_tags)])
...
+ def test_tags_helper(self):
+ expected = set(['present']), set(['missing', 'going'])
+ input = set(['present']), set(['missing'])
+ self.assertEqual(
+ expected, self.result1._merge_tags(input, set(), set(['going'])))
+ expected = set(['present']), set(['missing', 'going'])
+ input = set(['present', 'going']), set(['missing'])
+ self.assertEqual(
+ expected, self.result1._merge_tags(input, set(), set(['going'])))
+ expected = set(['coming', 'present']), set(['missing'])
+ input = set(['present']), set(['missing'])
+ self.assertEqual(
+ expected, self.result1._merge_tags(input, set(['coming']), set()))
+ expected = set(['coming', 'present']), set(['missing'])
+ input = set(['present']), set(['coming', 'missing'])
+ self.assertEqual(
+ expected, self.result1._merge_tags(input, set(['coming']), set()))

Changed in testtools:
status: In Progress → Fix Committed
Revision history for this message
Jonathan Lange (jml) wrote :

On Wed, Jan 11, 2012 at 1:44 PM, Robert Collins
<email address hidden> wrote:
> On Wed, Jan 11, 2012 at 11:24 PM, Jonathan Lange <email address hidden> wrote:
>> Those tests weren't failing before, so they are no good for preventing
>> regressions in this behaviour.
>
> Those tests didn't exist before.

My bad. The test_testresult file was obscured in the loggerhead code
page (which is where I went in lieu of a merge proposal).

jml

Brad Crittenden (bac)
Changed in launchpad:
status: In Progress → Triaged
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

Remote bug watches

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