Back to index

enigmail  1.4.3
Public Member Functions
runtests.CheckXPTDump Class Reference

List of all members.

Public Member Functions

def test_xpt_dump_diffs

Detailed Description

Definition at line 49 of file runtests.py.


Member Function Documentation

Definition at line 50 of file runtests.py.

00050 
00051         def test_xpt_dump_diffs(self):
00052             MOZILLA_OBJDIR = os.environ["MOZILLA_OBJDIR"]
00053             xptdump = os.path.abspath(os.path.join(MOZILLA_OBJDIR,
00054                                                    "dist", "bin", "xpt_dump"))
00055             components = os.path.abspath(os.path.join(MOZILLA_OBJDIR,
00056                                                    "dist", "bin", "components"))
00057             for f in os.listdir(components):
00058                 if not f.endswith(".xpt"):
00059                     continue
00060                 fullpath = os.path.join(components, f)
00061                 # read a Typelib and dump it to a string
00062                 t = xpt.Typelib.read(fullpath)
00063                 self.assert_(t is not None)
00064                 outf = StringIO()
00065                 t.dump(outf)
00066                 out = outf.getvalue()
00067                 # now run xpt_dump on it
00068                 out2 = get_output(xptdump, fullpath)
00069                 if out != out2:
00070                     print "diff %s" % f
00071                     for line in difflib.unified_diff(out2.split("\n"), out.split("\n"), lineterm=""):
00072                         print line
00073                 self.assert_(out == out2, "xpt_dump output should be identical for %s" % f)

Here is the call graph for this function:


The documentation for this class was generated from the following file: