Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)