the output starts with some useful information about the platform and interpreter this can be useful for sharing bugs across disparate systems the third line tells us the name of the file being tested (if there are multiple test modules picked upthey will all be displayed)followed by the familiar we saw in the unittest modulethe character indicates passing testwhile the letter demonstrates failure after all tests have runthe error output for each of them is displayed it presents summary of local variables (there is only one in this examplethe self parameter passed into the function)the source code where the error occurredand summary of the error message in additionif an exception other than an assertionerror is raisedpy test will present us with complete tracebackincluding source code references by defaultpy test suppresses output from print statements if the test is successful this is useful for test debuggingwhen test is failingwe can add print statements to the test to check the values of specific variables and attributes as the test runs if the test failsthese values are output to help with diagnosis howeveronce the test is successfulthe print statement output is not displayedand they can be easily ignored we don' have to "clean upthe output by removing print statements if the tests ever fail againdue to future changesthe debugging output will be immediately available one way to do setup and cleanup py test supports setup and teardown methods similar to those used in unittestbut it provides even more flexibility we'll discuss these brieflysince they are familiarbut they are not used as extensively as in the unittest moduleas py test provides us with powerful funcargs facilitywhich we'll discuss in the next section if we are writing class-based testswe can use two methods called setup_method and teardown_method in basically the same way that setup and teardown are called in unittest they are called before and after each test method in the class to perform setup and cleanup duties there is one difference from the unittest methods though both methods accept an argumentthe function object representing the method being called in additionpy test provides other setup and teardown functions to give us more control over when setup and cleanup code is executed the setup_class and teardown_class methods are expected to be class methodsthey accept single argument (there is no self argumentrepresenting the class in question