Bug 387401 - can't "import test" in Python2.5.1
Summary: can't "import test" in Python2.5.1
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 8
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-16 18:42 UTC by Guang Tang
Modified: 2008-03-06 05:49 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-11-30 05:32:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Guang Tang 2007-11-16 18:42:26 UTC
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):
python-2.5.1-15.fc8

How reproducible:

in Python prompt, type "import test"

  
Actual results:
>>> import test
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named test


Expected results:
>>> import test
>>>

Additional info:

Comment 1 James Antill 2007-11-16 21:09:28 UTC
 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?


Comment 2 Guang Tang 2007-11-16 21:36:01 UTC
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. 

Comment 3 Steven Ludtke 2008-03-06 02:43:46 UTC
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
people :^(

Comment 4 James Antill 2008-03-06 05:49:46 UTC
 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).



Note You need to log in before you can comment on or make changes to this bug.