def startTest(self, test):
        """
        Called before the start of each test
        """
        # Get our bearings
        test = proto_test(test)
        current_module = test.module
        current_class  = test.class_name

        # Output
        if self.showAll:
            # Module...if it changed.
            if current_module != self.last_module:
                self.stream.writeln(self.colors.moduleName(current_module))
            # Class...if it changed.
            if current_class != self.last_class:
                self.stream.writeln(self.colors.className(
                    self.stream.formatText(current_class, indent=1)))
            if self.stream.isatty():
                # In the terminal, we will write a placeholder, and then
                # modify the first character and rewrite it in color after
                # the test has run.
                self.first_text_output = self.stream.formatLine(
                    test.getDescription(self.verbose),
                    indent=2)
                self.stream.write(self.colors.bold(self.first_text_output))
            self.stream.flush()

        # Set state for next time
        if current_module != self.last_module:
            self.last_module = current_module
        if current_class != self.last_class:
            self.last_class = current_class
def startTest ( self , test ) : test = proto_test ( test ) current_module = test . module current_class = test . class_name if self . showAll : if current_module != self . last_module : self . stream . writeln ( self . colors . moduleName ( current_module ) ) if current_class != self . last_class : self . stream . writeln ( self . colors . className ( self . stream . formatText ( current_class , indent = 1 ) ) ) if self . stream . isatty ( ) : self . first_text_output = self . stream . formatLine ( test . getDescription ( self . verbose ) , indent = 2 ) self . stream . write ( self . colors . bold ( self . first_text_output ) ) self . stream . flush ( ) if current_module != self . last_module : self . last_module = current_module if current_class != self . last_class : self . last_class = current_class
Called before the start of each test