Red Hat Bugzilla – Bug 387401
can't "import test" in Python2.5.1
Last modified: 2008-03-06 00:49:46 EST
Description of problem:
in Python, I can not import test. This happens for both i386 and x86_64 F8.
All the unit test written for our project need this module.
Version-Release number of selected component (if applicable):
in Python prompt, type "import test"
>>> import test
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named test
>>> import test
We've been removing it explicitly under the assumption that noone used it
outside of the Python build. And given that's it's almost 9MB, I really don't
want to include it all again.
Are you just using test_support.py as in the documentation? If not do you know
which bits you are using?
We write unit test class as a subclass of unittest.TestCase. Then in the main
function call test.test_support.run_unittest(MyTestClass1).
It is convenient and Python from python.org support it. We test our product on
Windows, MacOS, and many Linux distributions, from Mandriva, Fedora, SuSE,
CentOS, to Ubuntu. They all have test module in it except F8. I an sorry I
really don't think 9MB space is a good reason to make F8's Python not
consistent with its peers.
I'd like to second this complaint. We use this module for unit testing in a
python-based scientific image processing suite. The unit tests work on every
linux platform we've found (and even on Windows) except for FC8 because of this
issue. One of the benefits of Python is that it is so well standardized across
platforms. I respect your not wanting to bloat the distro, but I suspect there
are other packages being bitten by this as well. While the idea of unit test
failing because of missing unit testing infrastructure rather than a problem
with the package might be ironic, it isn't very pleasant when we try to support
For Fedora 9, python now has a python-test sub-package ... which will give you
all of the module specific testing file (at ~2.8MB).
The base python package also contains test_support.py and __init__.py file for
the test dir (Ie. it should make the documentation examples work).