Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 341095 - dev-python/testtools does not install tests subdir
Summary: dev-python/testtools does not install tests subdir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: bazaar+obsolete
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-15 08:00 UTC by Xake
Modified: 2010-10-17 22:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2010-10-15 08:00:38 UTC
If you try to install subunit-0.0.6 you get the following error:

make[1]: Entering directory `/var/tmp/portage/dev-python/subunit-0.0.6/work/subunit-0.0.6-2.6'
Traceback (most recent call last):
  File "./runtests.py", line 23, in <module>
    from subunit.tests.TestUtil import TestVisitor, TestSuite
  File "/var/tmp/portage/dev-python/subunit-0.0.6/work/subunit-0.0.6-2.6/python/subunit/tests/__init__.py", line 17, in <module>
    from subunit.tests import (
  File "/var/tmp/portage/dev-python/subunit-0.0.6/work/subunit-0.0.6-2.6/python/subunit/tests/test_test_protocol.py", line 25, in <module>
    from testtools.tests.helpers import (
ImportError: No module named tests.helpers
FAIL: runtests.py

This is because of the following logic in dev-python/testtools:
        delete_tests() {
                rm -fr "${ED}$(python_get_sitedir)/testtools/tests"
        }
        python_execute_function -q delete_tests


Confirmed that removing this piece of code from src_install in dev-python/testtools makes subunit pass tests.
So apparently this piece of code removes what is not only tests for dev-python/testtools itself, but also used by other projects/packages and should not be unconditionally removed.
Or at least being hidden behind a USE="test", and have dev-python/subunit depend on that use flag. I have however problems to see how an additional of ~1MB of files (if you have both python:2.6 and python:3.1) can kill that many installs.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-17 22:16:44 UTC
Tests are installed by dev-python/testtools-0.9.7.