How do I test the integrity of a Python installation in Debian and Ubuntu

Aahz aahz at pythoncraft.com
Mon May 11 11:22:10 EDT 2009


In article <mailman.5375.1241962005.11746.python-list at python.org>,
Geoff Gardiner  <ggardiner at iee.org> wrote:
>Aahz wrote:
>> 
>> What directory are you running this from?  What happens if you switch to
>> running "python Lib/test/regrtest.py"?  Taking a closer look, this looks
>> more like a plain import error.
>
>I couldn't do quite that because there's no Lib, but instead (in Ubuntu
>Hardy, this time):
>....
>gegard at gegard:~$ cd /usr/lib/python2.5/
>gegard at gegard:/usr/lib/python2.5$ python test/regrtest.py
>
>9 tests skipped:
>    test_builtin test_doctest test_doctest2 test_exceptions
>    test_grammar test_opcodes test_operations test_types test_unittest
>Traceback (most recent call last):
>  File "test/regrtest.py", line 1384, in <module>
>    main()
>  File "test/regrtest.py", line 416, in main
>    e = _ExpectedSkips()
>  File "test/regrtest.py", line 1321, in __init__
>    from test import test_socket_ssl
>ImportError: cannot import name test_socket_ssl
>gegard at gegard:/usr/lib/python2.5$
>
>Also
>gegard at gegard:~$ locate */test_socket_ssl.*
>gegard at gegard:~$ #returns nothing
>
>And
>gegard at gegard:~$ locate /usr/lib/python2.5/test/test_*.*
>/usr/lib/python2.5/test/test_support.py
>/usr/lib/python2.5/test/test_support.pyc
>gegard at gegard:~$

That seems to demonstrate that regrtest.py is indeed a good mechanism for
finding out whether it's a b0rked install!
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan



More information about the Python-list mailing list