[Python-ideas] Fwd: Adding a test discovery into Python

Guilherme Polo ggpolo at gmail.com
Thu Mar 12 12:33:18 CET 2009


On Thu, Mar 12, 2009 at 12:04 AM, Leonardo Santagada
<santagada at gmail.com> wrote:
>
> On Mar 11, 2009, at 8:05 PM, Guilherme Polo wrote:
>>
>> On Wed, Mar 11, 2009 at 7:37 PM, Raymond Hettinger <python at rcn.com> wrote:
>>>
>>> [Christian Heimes]
>>>>>>
>>>>>> I'm +1 for a simple (!) test discovery system. I'm emphasizing on
>>>>>> simple
>>>>>> because there are enough frameworks for elaborate unit testing.
>>>
>>> Test discovery is not the interesting part of the problem.
>>
>> Interesting or not, it is a problem that is asking for a solution,
>> this kind of code is being duplicated in several places for no good
>> reason.
>>
>>>
>>> Axiom:  The more work involved in writing tests, the fewer
>>> tests that will get written.
>>
>> At some point you will have to run them too, I don't think you want to
>> reimplement the discovery part yet another time.
>
>
> What I think he was getting at is that 20-30 lines of test discovery have to
> be written once for each project (or none if using py.test/nose), but
> self.assertequals and all of the other quirks of unittest are all over a
> test suite and you need to write all of it each time you have to make a
> test.
>
> Not that what you are trying to do is pointless, but fixing this other
> problem is so much more interesting...
>

This is incredible pointless if you think it this way, "only 20-30
lines". I really don't believe you will come up with something decent
in 20-30 lines if you intend this to be reusable for nose and maybe
py.test (although I haven't looked much into py.test), it is not just
about finding files, have you read the previous emails in the
discussion ?

>
> --
> Leonardo Santagada
> santagada at gmail.com



-- 
-- Guilherme H. Polo Goncalves



More information about the Python-ideas mailing list