pytest
index
/home/ut3hax/bin/pytest

Usage: pytest [OPTIONS] PATHS AND OR FILES
You may pass an arbitrary number of directoies and files.
 
Directories passed in will be scanned, all files starting with test_ and ending 
with a .py extention will be inspeced for classes that inherit from
unittest.TestCase, and added to the runner.
 
Examples:
    Normal Mode:
    pytest Controls/test_Label.py Controls/test_TimePicker.py 
    pytest Controls/
    pytest Controls/ util/utiltest.py
    
    Email Only Mode (good for cron jobs):
    pytest Controls/ -e jlee@test.com -e jlowery@test.com -q

 
Modules
       
cStringIO
datetime
logging
optparse
os
smtplib
sys
unittest

 
Classes
       
__builtin__.object
MyStream
unittest.TestResult(__builtin__.object)
MyTestResult

 
class MyStream(__builtin__.object)
        stereotype: Proxy 
Used to decorate file-like objects with a handy 'writeln' method
 
  Methods defined here:
__getattr__(self, attr)
__init__(self, stream=<cStringIO.StringO object>)
writeln(self, arg=None)

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'MyStream' objects>
list of weak references to the object (if defined)

 
class MyTestResult(unittest.TestResult)
    Overriding the built in test resulter to be able to email failures, or
hide results based on the options passed into this program.
 
 
Method resolution order:
MyTestResult
unittest.TestResult
__builtin__.object

Methods defined here:
__init__(self, quiet=False, emails=[])
getDescription(self, test)
getEF(self)
Returns errors and failures as a string
printError(self, flavour, test, error)
printErrorList(self, flavour, errors)
sendEmails(self)

Properties defined here:
results
get = results(self)

Data and other attributes defined here:
emails = []
quiet = False
separator1 = '================================================================================'
separator2 = '--------------------------------------------------------------------------------'

Methods inherited from unittest.TestResult:
__repr__(self)
addError(self, test, err)
Called when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().
addFailure(self, test, err)
Called when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().
addSuccess(self, test)
Called when a test has completed successfully
startTest(self, test)
Called when the given test is about to be run
stop(self)
Indicates that the tests should be aborted
stopTest(self, test)
Called when the given test has been run
wasSuccessful(self)
Tells whether or not this result was a success

Data and other attributes inherited from unittest.TestResult:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'TestResult' objects>
list of weak references to the object (if defined)

 
Functions
       
email_accumulator = my_callback(option, opt, value, parser)
get_cases_from_dir(scan_dir, test_cases=[])
get_cases_from_file(file)
get_emails()
mail(to='', text='')
Usage:
mail(to='me@example.com', text='This is a test')
mail(to=['me@example.com','friend@example.com'], text='This is a test')
main()

 
Data
        log = <logging.Logger instance>