Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | setUp |
def | tearDown |
def | countTestCases |
def | defaultTestResult |
def | shortDescription |
def | id |
def | __str__ |
def | __repr__ |
def | run |
def | __call__ |
def | debug |
def | fail |
def | failIf |
def | failUnless |
def | failUnlessRaises |
def | failUnlessEqual |
def | failIfEqual |
Static Public Attributes | |
failureException = AssertionError | |
assertEqual = failUnlessEqual | |
assertNotEqual = failIfEqual | |
assertRaises = failUnlessRaises | |
assert_ = failUnless | |
A class whose instances are single test cases. By default, the test code itself should be placed in a method named 'runTest'. If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute. Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test's environment ('fixture') can be implemented by overriding the 'setUp' and 'tearDown' methods respectively. If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.
Definition at line 120 of file unittest.py.
def __init__ | ( | self, | |
methodName = 'runTest' |
|||
) |
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
Definition at line 148 of file unittest.py.
References SymbolTable.__class__, TestCase.__testMethodDoc, and TestCase.__testMethodName.
def __call__ | ( | self, | |
result = None |
|||
) |
Definition at line 198 of file unittest.py.
References TestCase.__exc_info(), TestCase.__testMethodName, TestCase.defaultTestResult(), TestCase.failureException, TestCase.setUp(), and TestCase.tearDown().
def __repr__ | ( | self) |
Definition at line 191 of file unittest.py.
References SymbolTable.__class__, and TestCase.__testMethodName.
def __str__ | ( | self) |
Definition at line 188 of file unittest.py.
References SymbolTable.__class__, and TestCase.__testMethodName.
def countTestCases | ( | self) |
Definition at line 169 of file unittest.py.
def debug | ( | self) |
Run the test without collecting errors in a TestResult
Definition at line 233 of file unittest.py.
References TestCase.__testMethodName, TestCase.setUp(), and TestCase.tearDown().
def defaultTestResult | ( | self) |
Definition at line 172 of file unittest.py.
def fail | ( | self, | |
msg = None |
|||
) |
Fail immediately, with the given message.
Definition at line 252 of file unittest.py.
References TestCase.failureException.
def failIf | ( | self, | |
expr, | |||
msg = None |
|||
) |
def failIfEqual | ( | self, | |
first, | |||
second, | |||
msg = None |
|||
) |
Fail if the two objects are equal as determined by the '==' operator.
Definition at line 289 of file unittest.py.
References TestCase.failureException.
def failUnless | ( | self, | |
expr, | |||
msg = None |
|||
) |
Fail the test unless the expression is true.
Definition at line 260 of file unittest.py.
References TestCase.failureException.
def failUnlessEqual | ( | self, | |
first, | |||
second, | |||
msg = None |
|||
) |
Fail if the two objects are unequal as determined by the '!=' operator.
Definition at line 281 of file unittest.py.
References TestCase.failureException.
def failUnlessRaises | ( | self, | |
excClass, | |||
callableObj, | |||
args, | |||
kwargs | |||
) |
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.
Definition at line 264 of file unittest.py.
References TestCase.failureException, and locale.str().
def id | ( | self) |
Definition at line 185 of file unittest.py.
References SymbolTable.__class__, and TestCase.__testMethodName.
def run | ( | self, | |
result = None |
|||
) |
Definition at line 195 of file unittest.py.
def setUp | ( | self) |
Definition at line 161 of file unittest.py.
def shortDescription | ( | self) |
Returns a one-line description of the test, or None if no description has been provided. The default implementation of this method returns the first line of the specified test method's docstring.
Definition at line 175 of file unittest.py.
References TestCase.__testMethodDoc, string.split(), and string.strip().
def tearDown | ( | self) |
Definition at line 165 of file unittest.py.
|
static |
Definition at line 303 of file unittest.py.
|
static |
Definition at line 297 of file unittest.py.
|
static |
Definition at line 299 of file unittest.py.
|
static |
Definition at line 301 of file unittest.py.
|
static |
Definition at line 146 of file unittest.py.