assert_(expr [msg] failunless(expr [msg]signals test failure if expr evaluates as false msg is message string giving an explanation for the failure (if anyt assertequal(xy [,msg] failunlessequal(xy [msg]signals test failure if and are not equal to each other msg is message explaining the failure (if anyt assertnotequal(xy [msg] failifequal(xy[msg]signals test failure if and are equal to each other msg is message explaining the failure (if anyt assertalmostequal(xy [places [msg]] failunlessalmostequal(xy[places [msg]]signals test failure if numbers and are not within places decimal places of each other this is checked by computing the difference of and and rounding the result to the given number of places if the result is zerox and are almost equal msg is message explaining the failure (if anyt assertnotalmostequal(xy[places [msg]] failifalmostequal(xy [places [msg]]signals test failure if and are not at least places decimal places apart msg is message explaining the failure (if anyt assertraises(exccallablet failunlessraises(exccallablesignals test failure if the callable object callable does not raise the exception exc remaining arguments are passed as arguments to callable multiple exceptions can be checked by using tuple of exceptions as exc failif(expr [msg]signals test failure if expr evaluates as true msg is message explaining the failure (if anyt fail([msg]signals test failure msg is message explaining the failure (if anyt failureexception this attribute is set to the last exception value caught in test this may be useful if you not only want to check that an exception was raisedbut that the exception raises an appropriate value--for exampleif you wanted to check the error message generated as part of raising an exception lib fl ff