Package cherrypy :: Package test :: Module test :: Class CommandLineParser
[hide private]
[frames] | no frames]

Class CommandLineParser

source code

object --+
         |
        CommandLineParser

Instance Methods [hide private]
 
__init__(self, available_tests, args=[])
Constructor to populate the TestHarness instance.
source code
 
help(self)
Print help for test.py command-line options.
source code
 
start_coverage(self)
Start the coverage tool.
source code
 
stop_coverage(self)
Stop the coverage tool, save results, and report.
source code
 
report_coverage(self)
Print a summary from the code coverage tool.
source code
 
run(self, conf=None)
Run the test harness (using the given [global] conf).
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  available_servers = {'cpmodpy': 'cpmodpy', 'modfcgid': 'modfcg...
  default_server = 'wsgi'
  scheme = 'http'
  protocol = 'HTTP/1.1'
  port = 8080
  host = '127.0.0.1'
  cover = False
  profile = False
  validate = False
  conquer = False
  server = None
  basedir = None
  interactive = True
  shortopts = []
  longopts = ['cover', 'profile', 'validate', 'conquer', 'dumb',...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, available_tests, args=[])
(Constructor)

source code 
Constructor to populate the TestHarness instance.

available_tests should be a list of module names (strings).

args defaults to sys.argv[1:], but you can provide a different
    set of args if you like.

Overrides: object.__init__

start_coverage(self)

source code 

Start the coverage tool.

To use this feature, you need to download 'coverage.py', either Gareth Rees' original implementation: http://www.garethrees.org/2001/12/04/python-coverage/

or Ned Batchelder's enhanced version: http://www.nedbatchelder.com/code/modules/coverage.html

If neither module is found in PYTHONPATH, coverage is silently(!) disabled.


Class Variable Details [hide private]

available_servers

Value:
{'cpmodpy': 'cpmodpy',
 'modfcgid': 'modfcgid',
 'modpygw': 'modpygw',
 'modwsgi': 'modwsgi',
 'wsgi': 'cherrypy._cpwsgi.CPWSGIServer'}

longopts

Value:
['cover',
 'profile',
 'validate',
 'conquer',
 'dumb',
 '1.0',
 'ssl',
 'help',
...