Commits

Georg Brandl committed 183947d

Print output of external tools on validation error.

Comments (0)

Files changed (2)

tests/test_html_formatter.py

             po = subprocess.Popen(['nsgmls', '-s', '-c', catname, pathname],
                                   stdout=subprocess.PIPE)
             ret = po.wait()
+            output = po.stdout.read()
             po.stdout.close()
         except OSError:
             # nsgmls not available
             pass
         else:
+            if ret:
+                print output
             self.assertFalse(ret, 'nsgmls run reported errors')
 
         os.unlink(pathname)

tests/test_latex_formatter.py

             po = subprocess.Popen(['latex', '-interaction=nonstopmode',
                                    pathname], stdout=subprocess.PIPE)
             ret = po.wait()
+            output = po.stdout.read()
             po.stdout.close()
         except OSError:
             # latex not available
             pass
         else:
+            if ret:
+                print output
             self.assertFalse(ret, 'latex run reported errors')
 
         os.unlink(pathname)