Daniel Rall wrote:
> Though TestCase does seem like a really appropriate name here, it also
> seems easily confusable with the standard unittest.TestCase class.
Yes, I considered this point when naming the class.
BTW, before I started mucking about in svntest, there was a class called
TestCase in testcase.py, even less related to unittest.TestCase. I
renamed that class to TestRunner and moved it to main.py because that
seemed like a better description of its role. But of course that is no
excuse for re-using a confusing name.
I'd be fine with renaming the TestCase class. But since its role is
similar to that of unittest.TestCase, I would like its name to be
similar too (so that experience in one framework carries over more
easily to the other). What name would you like? Maybe SvnTestCase?
CmdLineTestCase?
To me, a more interesting question is whether svntest should build on
Python's unittest infrastructure instead of implementing everything from
scratch. I have been postponing the investigation of this issue pending
the more obvious cleanups that I wanted to work on.
Michael
> On Sat, 08 Apr 2006, mhagger@tigris.org wrote:
>>Author: mhagger
>>Date: Sat Apr 8 15:25:14 2006
>>New Revision: 19269
>>
>>Modified:
>> trunk/subversion/tests/cmdline/svntest/main.py
>> trunk/subversion/tests/cmdline/svntest/testcase.py
>>
>>Log:
>>Create an abstract base class TestCase, from which _Predicate inherits.
>>
>>[in subversion/tests/cmdline/svntest]
>>
>>* testcase.py (TestCase): New class. Some method bodies for
>> check_description() and convert_result() taken from _Predicate.
>>
>> (_Predicate): Inherit from TestCase. Use inherited definitions of
>> check_description() and convert_result().
>>
>> (create_test_case): New function (renamed from create_predicate()).
>>
>>* main.py (TestRunner.__init__): Call testcase.create_test_case() by
>> its new name.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 17 23:51:27 2006