def to_string(self) -> str: s = "" if self.path is not None: s = (COLOR_1 + self._path_to_string(self.path) + " " + COLOR_2 + str(self.line) + "\n") if self.level == Report.WARNING: s = s + " " elif self.level == Report.ERROR: s = s + " " else: s = s + " " s = s + Fore.WHITE + indentation.set(self.message, 1) return s
def test_various_multi_lines( self, string, level, expected ): assert indentation.set(string, level) == expected
def test_multi_lines_with_empty_lines2( self, string, level, expected ): assert indentation.set(string, level) == expected