#770: Location of test cases for bloodhound_multiproduct is not consistent with other projects ---------------------------+-------------------- Reporter: rjollos | Owner: nobody Type: defect | Status: new Priority: major | Milestone: Component: multiproduct | Version: Resolution: | Keywords: ---------------------------+--------------------
Comment (by olemis): Well , the reasons are : 1. Having a single top-level tests module (as opposite to Trac's scattered test modules) is convenient considering the package test discovery code 2. For code with functional + unit tests (i.e. quite often) I prefer to write tests in a separate package hierarchy because : * they should not be installed in production deployments * they might be packaged and distributed independently should they be run against a given source tree to identify a certain issue , but then discarded * in practice there might be no need to import top-level source tree in order to import top-level test module and contained test code especially if writing functional tests - you'll need other dependencies instead e.g. [pypi:selenium] , [pypi:twill] , stdlid `xmlrpclib` ... - and even for unit tests the top-level source package may always be imported and resources located with the help of `pkg_resources` 3. other references * https://pytest.org/latest/goodpractises.html#choosing-a-test- layout-import-rules * http://stackoverflow.com/questions/5341006/where-should-i-put- tests-when-packaging-python-modules * http://stackoverflow.com/questions/61151/where-do-the-python-unit- tests-go -- Ticket URL: <https://issues.apache.org/bloodhound/ticket/770#comment:3> Apache Bloodhound <https://issues.apache.org/bloodhound/> The Apache Bloodhound issue tracker