Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running python's own unit tests?

19 views
Skip to first unread message

Russell E. Owen

unread,
Nov 14, 2013, 2:12:09 PM11/14/13
to pytho...@python.org
I'm building python from source and trying to figure out how to test the
result. I must be overlooking something obvious, but I looked through
the documentation and source and tried some google searches (which turn
up plenty about writing unit tests in python, but nothing about testing
a python distribution).

Any hints?

-- Russell

Tim Golden

unread,
Nov 14, 2013, 2:19:25 PM11/14/13
to pytho...@python.org

Zachary Ware

unread,
Nov 14, 2013, 3:13:06 PM11/14/13
to pytho...@python.org
On Thu, Nov 14, 2013 at 1:12 PM, Russell E. Owen <ro...@uw.edu> wrote:
> I'm building python from source and trying to figure out how to test the
> result. I must be overlooking something obvious, but I looked through
> the documentation and source and tried some google searches (which turn
> up plenty about writing unit tests in python, but nothing about testing
> a python distribution).
>
> Any hints?

`python -m test -uall` will test everything (where 'python' invokes
the interpreter you built, which may be "python_d.exe" on Windows if
you built in Debug mode, or "python.exe" on OSX). If you're testing
2.7, '-m test' needs to be '-m test.regrtest'.

For any further detail, check Tim's link to the devguide, specifically
the chapter on running tests.

--
Zach

Tim Golden

unread,
Nov 14, 2013, 3:18:04 PM11/14/13
to pytho...@python.org
Sorry if I seemed a bit terse; I was just on my way downstairs. But the
front page his quite neat instructions for building and testing on most
platforms.

TJG

Terry Reedy

unread,
Nov 14, 2013, 6:13:37 PM11/14/13
to pytho...@python.org
On 11/14/2013 2:12 PM, Russell E. Owen wrote:
> I'm building python from source and trying to figure out how to test the
> result. I must be overlooking something obvious, but I looked through
> the documentation and source and tried some google searches (which turn
> up plenty about writing unit tests in python, but nothing about testing
> a python distribution).
>
> Any hints?

http://docs.python.org/3/library/test.html#running-tests-using-the-command-line-interface

Or 2.7 equivalent.

--
Terry Jan Reedy

Russell E. Owen

unread,
Nov 15, 2013, 6:10:45 PM11/15/13
to pytho...@python.org
In article <5285223...@timgolden.me.uk>,
Tim Golden <ma...@timgolden.me.uk> wrote:

> http://docs.python.org/devguide/

Thank you and the other responders. I was expecting to find the
information here <http://docs.python.org/2/using/unix.html> under
Building Python. The developer's guide is a nice resource.

-- Russell

Tim Golden

unread,
Nov 16, 2013, 6:05:11 AM11/16/13
to pytho...@python.org
There's probably a case for referring to the dev guide from that page
under "Building Python". I'll propose a patch.

TJG

0 new messages