[TIP] Fwd: Fwd: Advice on location of tests modules

Olemis Lang olemis at gmail.com
Fri Feb 28 13:21:28 PST 2014


---------- Forwarded message ----------
From: Olemis Lang <olemis at gmail.com>
Date: Fri, Feb 28, 2014 at 4:20 PM
Subject: Re: [TIP] Fwd: Advice on location of tests modules
To: John Wong <gokoproject at gmail.com>





On Thu, Feb 27, 2014 at 7:30 PM, John Wong <gokoproject at gmail.com> wrote:

>
>
> On Thu, Feb 27, 2014 at 6:51 PM, Olemis Lang <olemis at gmail.com> wrote
>
>>
>> The structure is like this
>>
>> + /trunk
>> | +-- bloodhound_dashboard
>> | |    +-- setup.py
>> | |    +-- bhdashboard
>> | |         +-- ... plugin source code with sub packages ...
>> | |         +-- tests
>> | |              +--- ... test code ...
>>
>>
>>> I believe this means tests is also included in the package installation
>>> (when you run setup.py)
>>>
>>
>> no, afaict those folders are ignored in setup.py pkg defintion . For
>> multiproduct module the separation is more obvious . Harder to see for trac
>> source tree .
>>
>>
>
> I know this is not the right place to discuss this, but are you sure? I
> just cloned and did a test.
>
> >>> from bhdashboard.tests import test_report
>

I thought you were referring to bdist_* packages ...


>  In fact, bloodhound_multiproduct is the only package that has tests/ next
> to setup.py. I think all the points you in comment 3 (
> https://issues.apache.org/bloodhound/ticket/770#comment:3) are valid.
>
> To back up your argument:  see
> http://www.ianbicking.org/docs/setuptools-presentation/  slide 20 though.
>
>
ok , thanks .

[...]

>
> So why would anyone choose to make tests a subpackage?
> setuptools provides another command called tests (python setup.py tests).
> See
> http://stackoverflow.com/questions/4734292/specifying-where-to-install-tests-require-dependecies-of-a-distribute-setuptoo
> I can even hook this up with nose and pytest. Therefore, people who choose
> to make tests a submodule can separate test dependencies from project
> dependencies. That's probably the #1 defense.
>
>
Yes , I use setuptools test command quite often , and I can even use it
with layout (3) in bloodhound_multiproduct plugin by installing source
packages (or svn checkout) using setup.py develop cmd ...

[...]

-- 
Regards,

Olemis - @olemislc

Apache(tm) Bloodhound contributor
http://issues.apache.org/bloodhound
http://blood-hound.net

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:





-- 
Regards,

Olemis - @olemislc

Apache(tm) Bloodhound contributor
http://issues.apache.org/bloodhound
http://blood-hound.net

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140228/0e0a1144/attachment.htm>


More information about the testing-in-python mailing list