def t(self): cmdgenerate.run(['--', '--quiet', '--type', 'xml', '--output', 'xml'] + files) for f in ofiles: b = os.path.basename(f) xmlname = b[len(name)+1:] gf = fs.fs.open(os.path.join('xml', 'xml', xmlname)) got = gf.read() exp = open(f).read() self.maxDiff = None self.assertMultiLineEqual(got, exp) fs.fs.clear()
def t(self): cmdgenerate.run(['--', '--quiet', '--type', 'xml', '--output', 'xml'] + files) for f in ofiles: b = os.path.basename(f) xmlname = b[len(name)+1:] gf = fs.fs.open(os.path.join('xml', 'xml', xmlname)) got = objectify.parse(gf) got = etree.tostring(got, pretty_print=True) exp = objectify.parse(open(f)) exp = etree.tostring(exp, pretty_print=True) self.maxDiff = None self.assertMultiLineEqual(got, exp) fs.fs.clear()
def t(self): fs.fs = fs.System tmpdir = fs.fs.mkdtemp() gendir = os.path.join(tmpdir, 'static') cmdgenerate.run(['--', '--quiet', '--type', 'html', '--static', '--output', gendir] + files) for f in ofiles: b = os.path.basename(f) htmlname = b[len(name)+1:len(b)-7] gf = fs.fs.open(os.path.join(gendir, htmlname)) got = gf.read() exp = open(f).read() self.maxDiff = None self.assertMultiLineEqual(got, exp) fs.fs.rmtree(gendir)
def t(self): fs.fs = fs.System tmpdir = fs.fs.mkdtemp() gendir = os.path.join(tmpdir, 'static') cmdgenerate.run([ '--', '--quiet', '--type', 'html', '--static', '--output', gendir ] + files) for f in ofiles: b = os.path.basename(f) htmlname = b[len(name) + 1:len(b) - 7] gf = fs.fs.open(os.path.join(gendir, htmlname)) got = gf.read() exp = open(f).read() self.maxDiff = None self.assertMultiLineEqual(got, exp) fs.fs.rmtree(gendir)