On 8/15/06, Fergal Daly <[EMAIL PROTECTED]> wrote:
On 15/08/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> 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,
Ah, yes, quite right. Most of my recent testing has been in Python, so
the details of perl's testing system aren't quite as fresh in my mind
as they used to be.
On the other hand, one thing I do recall clearly is that when I
started doing a lot of testing in Python, I thought it was stupid that
things like ``self.assertEquals(foo(), bar())`` didn't count as
"tests" like they did in perl/TAP.
Collin Winter