Is there a quick & accurate way to test a python install?

Gene Heskett gheskett at
Sun Dec 16 03:59:12 CET 2012

On Saturday 15 December 2012 21:52:00 Terry Reedy did opine:

> On 12/15/2012 9:21 PM, Gene Heskett wrote:
> > On Saturday 15 December 2012 21:19:37 Terry Reedy did opine:
> >> On 12/15/2012 8:38 PM, Gene Heskett wrote:
> >> 
> >> see
> >> 26.11.2.
> > 
> > I'm not a python guru, Terry, so you will have to expand on this
> > 26.11.2.
> nd-line-interface

This is 2.6, on ubuntu-10.04.4 LTS
> 3.x on command line: python -m test
> "Under the hood, it uses test.regrtest; the call python -m test.regrtest
> used in previous Python versions [ie, 2.x] still works)."
> Followed by more options and os specifics. It is also possible to run
> interactively. 'import test; test.main()' may do it, but it have been
> awhile and is not documented.

I googled and found something like that, but the machine thats bad throws 
the same error stanza as one that seems to work.  From the machine with the 

gene at lathe:/usr/lib/python2.6/test$ python -m test.regrtest
test_grammar skipped -- No module named test_grammar
test_opcodes skipped -- No module named test_opcodes
test_dict skipped -- No module named test_dict
test_builtin skipped -- No module named test_builtin
test_exceptions skipped -- No module named test_exceptions
test_types skipped -- No module named test_types
test_unittest skipped -- No module named test_unittest
test_doctest skipped -- No module named test_doctest
test_doctest2 skipped -- No module named test_doctest2
9 tests skipped:
    test_builtin test_dict test_doctest test_doctest2 test_exceptions
    test_grammar test_opcodes test_types test_unittest
Traceback (most recent call last):
  File "/usr/lib/python2.6/", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.6/", line 34, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.6/test/", line 1199, in <module>
  File "/usr/lib/python2.6/test/", line 423, in main
    e = _ExpectedSkips()
  File "/usr/lib/python2.6/test/", line 1112, in __init__
    from test import test_timeout
ImportError: cannot import name test_timeout
gene at lathe:/usr/lib/python2.6/test$ 

I think that looks identical to this machine, given the identical command 

Any other ideas, or is the above all foobar?

Thanks Terry.

Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <> is up!
Drinking coffee for instant relaxation?  That's like drinking alcohol for
instant motor skills.
		-- Marc Price
I was taught to respect my elders, but its getting 
harder and harder to find any...

More information about the Python-list mailing list