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()))
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): startTest( self) tags(set( []), set([])) t.tags( added_tags, removed_tags) ltLogsEqual( [('tags' , added_tags, removed_tags)]) helper( self): _merge_ tags(input, set(), set(['going']))) _merge_ tags(input, set(), set(['going']))) _merge_ tags(input, set(['coming']), set())) _merge_ tags(input, set(['coming']), set()))
+ # tags() does not fail the test run.
+ result = self.makeResult()
+ result.
+ result.
...
+ 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.multiResul
+ self.assertResu
...
+ def test_tags_
+ expected = set(['present']), set(['missing', 'going'])
+ input = set(['present']), set(['missing'])
+ self.assertEqual(
+ expected, self.result1.
+ expected = set(['present']), set(['missing', 'going'])
+ input = set(['present', 'going']), set(['missing'])
+ self.assertEqual(
+ expected, self.result1.
+ expected = set(['coming', 'present']), set(['missing'])
+ input = set(['present']), set(['missing'])
+ self.assertEqual(
+ expected, self.result1.
+ expected = set(['coming', 'present']), set(['missing'])
+ input = set(['present']), set(['coming', 'missing'])
+ self.assertEqual(
+ expected, self.result1.