Exemple #1
0
 def worker(self, testfile):
     global basedir
     # Create output files for comparison
     testpath = join(basedir, 'tests/')
     outpath = join(basedir, 'output/')
     if 'feed' in testfile:
         main(['-d', outpath, '-c', join(testpath, testfile), '-uw'])
     else:
         main(['-d', outpath, '-c', join(testpath, testfile), '-w'])
     # Parse the files and make sure they don't throw errors
     for f in ('foafroll.xml', 'opml.xml', 'rss20.xml'):
         handler = Handler()
         parser = xml.sax.make_parser()
         parser.setContentHandler(handler)
         parser.setErrorHandler(handler)
         parser.parse(join(outpath, f))
         self.assertFalse(handler.errors)
def launch():
	sys.exit(main(sys.argv[1:]))