def info(self, str_template, *args): if args: self.info_buf.write(u(str_template % args)) self.info_buf.write(u("\n")) else: self.info_buf.write(u(str_template)) self.info_buf.write(u("\n"))
def test_save(self): obj = Configuration() obj.merge({ "str": "text", "uc": u("ucstring") }) fname = tempfile.mkstemp()[1] obj.dump(fname, Configuration.YAML) with open(fname) as fh: written = fh.read() logging.debug("YAML:\n%s", written) self.assertNotIn("unicode", written)