On 8/15/06, Ovid <[EMAIL PROTECTED]> wrote:
----- Original Message ----
From: Fergal Daly <[EMAIL PROTECTED]>
> XUnit allows heirarchical grouping, TAP does not. DUnit (Delphi's
> XUnit) comes with a GUI that shows you a tree of tests/groups,
This is the sort of input that other's outside of the Perl community might be
able to
give due to their being familiar with the ins and outs of it.
Python's unittest (a derivative of JUnit) allows you to group related
tests (each test case is a method on a class) and then combine these
groups (via multiple inheritance). However, once composed, the methods
inherited from the parent classes appear in the test output as if they
had been defined on the child class directly. A quick illustration:
class TestLength(unittest.TestCase):
def test_empty(test):
test.assertEqual(len(test.empty), 0)
# Some other common len()-based tests
class TestDict(TestLength):
def setUp(test):
test.empty = dict()
# Some other tests for dict()
class TestList(TestLength):
def setUp(test);
test.empty = list()
# Some other tests for list()
When TestDict and TestList were run, they would both run a
test_empty() method; in the standard text output mode, this would show
up as TestDict.test_empty() and TestList.test_empty(), respectively.
All that to say: there'd be no problem integrating a TAP emitter as an
extension to Python's common testing framework. In fact, coding up
such a thing has been on my todo list for a week or two now.
Collin Winter