On 15/08/06, Collin Winter <[EMAIL PROTECTED]> wrote:
On 8/15/06, Fergal Daly <[EMAIL PROTECTED]> wrote:
> On 15/08/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > The solution to this particular issue would be to have your SomeTest
> > class override TestCase.id(), TestCase.__str__() and/or
> > TestCase.__repr__() to take into account the data attribute.
>
> That's necessary but in TAP terms only tests have names whereas here,
> each TestCase is actually a group of tests, so TestCase.__str__ has no
> place in the TAP output.

The TestCase *classes* are groups of tests, but each TestCase
*instance* is only a single test, meaning that
``str(TestCase('somemethod_name'))`` would invoke TestCase.__str__().

In the python world that's true but for Perl programmers looking at this:

class SomeTest(unittest.TestCase):
 def some_test(self):
   self.assertEquals(foo(), bar())
   self.assertEquals(buz(), qux())

each of those self.assertEquals is a test because it can pass or fail,
Each of those would generate a line of TAP output and possibly some
diagnostics,

F


Collin Winter

Reply via email to