document how to use python -m with testtools on python 2.4 (its not pretty)

Bug #501174 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Wishlist
Jonathan Lange

Bug Description

The testtools manual (and makefile) suggest the use of `python -m testtools.run ...` to run test suites. However, dotted modules with the -m switch do not work in Python 2.4:

    C:\>python -m testtools.run -h
    C:/Python24/python.exe: module testtools.run not found

    C:\>python Python24\Lib\site-packages\testtools\run.py -h
    usage: python -m testtools.run testspec [testspec...]

    Run some tests with the testtools extended API.

    For instance, to run the testtools test suite.
     $ python -m testtools.run testtools.tests.test_suite

    options:
      -h, --help show this help message and exit

If there is a good reason for `python -m testtools ...` to not Just Work, then this limitation should at least be mentioned in the documentation.

Martin Packman (gz)
description: updated
Revision history for this message
Robert Collins (lifeless) wrote :

Ok, this is a clear defect vis-a-vis python 2.4. I suggest that we conditionally output a better text for python 2.4.

Changed in testtools:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Robert Collins (lifeless) wrote :

There was a irc discussion the other day, python2.4 really can't do anything sensible here - it doesn't even import __init__ - so this is entirely a documentation issue - the user needs to run the .py file explicitly.

downgrading priority accordingly.

Changed in testtools:
importance: Critical → Wishlist
summary: - Suggest alternative to python -m testtools.run for Python 2.4
+ document how to use python -m with testtools on python 2.4 (its not
+ pretty)
Jonathan Lange (jml)
Changed in testtools:
status: Triaged → Fix Committed
assignee: nobody → Jonathan Lange (jml)
milestone: none → next
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.