Ejemplo n.º 1
0
 def test_emit_indented(self):
     output_stream = StringIO()
     s = SourceFile(output_stream, indentation=SourceFile.TAB)
     hello = "hello"
     expected = SourceFile.TAB + hello
     s.emit_indented(TextCodeElement(hello))
     self.assertEqual(output_stream.getvalue(), expected)
     output_stream.close()