[TIP] Guidelines for where to put tests & how to package them

Michael Foord fuzzyman at voidspace.org.uk
Mon Mar 1 08:36:26 PST 2010


On 01/03/2010 16:14, P.J. Eby wrote:
> At 01:37 PM 3/1/2010 +0000, Michael Foord wrote:
>> On 01/03/2010 13:32, Olemis Lang wrote:
>>> On Sat, Feb 27, 2010 at 2:33 PM, Michael Foord
>>> <fuzzyman at voidspace.org.uk>  wrote:
>>>
>>>> On 27/02/2010 19:22, C. Titus Brown wrote:
>>>>
>>>>
>>> [...]
>>>
>>>> Olemis was confused as to what setuptools did - it does not support a
>>>> callable for the test_suite argument.
>>>>
>>>>
>>> I was terribly wrong about `suite` and `unittest`, yes, however if
>>> there's something wrong with the following snippet
>>>
>>
>> According to the setuptools documentation the test_suite argument 
>> *can* be a callable. So you were right about that and Phillip was wrong!
>
> I never said it couldn't be a callable.  Olemis was asking for a 
> *parameterized* callable, for *test_runner* -- not test_suite.  
> Entirely different kettle of fish.
>
> The test_suite argument supports whatever the unittest command line 
> does, and that includes methods, modules, classes, and arbitrary 
> callables.
No he was asking about, and your reply was about, test_suite - although 
the *specific* issue of whether it could be a callable wasn't addresses. 
You said:
>
> No. test_suite is to be an object recognized by the test_loader as 
> convertible to a unittest TestSuite.  For example, a module, TestCase 
> subclass, etc.
However it turns out that unittest.main() *does* allow you to specify a 
callable, which I didn't think was the case. That does put a different 
slant on things.

All the best,

Michael

-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100301/9b804baa/attachment.htm>


More information about the testing-in-python mailing list