def testInfo_text(self):
   with tempfile.NamedTemporaryFile() as proto_file:
     proto_file.write(self._test_proto.SerializeToString())
     proto_file.flush()
     output = StringIO.StringIO()
     unified_launcher._PrintInfo(proto_file.name, 'text', out=output)
     self.assertTrue('skin: "800x900"' in output.getvalue(), output.getvalue())
Пример #2
0
 def testInfo_raw(self):
     with tempfile.NamedTemporaryFile() as proto_file:
         proto_file.write(self._test_proto.SerializeToString())
         proto_file.flush()
         output = StringIO.StringIO()
         unified_launcher._PrintInfo(proto_file.name, 'raw', out=output)
         self.assertEquals(output.getvalue(),
                           self._test_proto.SerializeToString())