def test_comment_multiline(self): writer = XMLWriter(BytesIO()) writer.comment("Hello world\nHow are you?") self.assertEqual( HEADER + b"<!-- Hello world" + linesep + b" How are you? -->", writer.file.getvalue())
def test_comment_multiline(self): writer = XMLWriter(BytesIO()) writer.comment("Hello world\nHow are you?") self.assertEqual(HEADER + b"<!-- Hello world" + linesep + b" How are you? -->", writer.file.getvalue())
def test_comment_escaped(self): writer = XMLWriter(BytesIO()) writer.comment("This&that are <comments>") self.assertEqual( HEADER + b"<!-- This&that are <comments> -->", writer.file.getvalue())
def test_comment_escaped(self): writer = XMLWriter(BytesIO()) writer.comment("This&that are <comments>") self.assertEqual(HEADER + b"<!-- This&that are <comments> -->", writer.file.getvalue())