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

Discussion in 'Python' started by Gene Heskett, Dec 16, 2012.

  1. Gene Heskett

    Gene Heskett Guest

    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.

    >
    > http://docs.python.org/3/library/test.html#running-tests-using-the-comma
    > 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
    problem:

    gene@lathe:/usr/lib/python2.6/test$ python -m test.regrtest
    test_grammar
    test_grammar skipped -- No module named test_grammar
    test_opcodes
    test_opcodes skipped -- No module named test_opcodes
    test_dict
    test_dict skipped -- No module named test_dict
    test_builtin
    test_builtin skipped -- No module named test_builtin
    test_exceptions
    test_exceptions skipped -- No module named test_exceptions
    test_types
    test_types skipped -- No module named test_types
    test_unittest
    test_unittest skipped -- No module named test_unittest
    test_doctest
    test_doctest skipped -- No module named test_doctest
    test_doctest2
    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/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
    File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
    File "/usr/lib/python2.6/test/regrtest.py", line 1199, in <module>
    main()
    File "/usr/lib/python2.6/test/regrtest.py", line 423, in main
    e = _ExpectedSkips()
    File "/usr/lib/python2.6/test/regrtest.py", line 1112, in __init__
    from test import test_timeout
    ImportError: cannot import name test_timeout
    gene@lathe:/usr/lib/python2.6/test$

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

    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: <http://coyoteden.dyndns-free.com:85/gene> 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...
    Gene Heskett, Dec 16, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gene Heskett
    Replies:
    0
    Views:
    99
    Gene Heskett
    Dec 16, 2012
  2. Terry Reedy
    Replies:
    0
    Views:
    137
    Terry Reedy
    Dec 16, 2012
  3. Gene Heskett
    Replies:
    0
    Views:
    141
    Gene Heskett
    Dec 16, 2012
  4. Terry Reedy
    Replies:
    0
    Views:
    133
    Terry Reedy
    Dec 16, 2012
  5. Gene Heskett
    Replies:
    0
    Views:
    120
    Gene Heskett
    Dec 16, 2012
Loading...

Share This Page