We are working on a fix for bug #21591 (http://www.logilab.org/ticket/21591), but we aren't sure how to test this.

As it is now, we test by running 'pylint -f html -r n *module* > something.html', but we don't know how to enable options when running tests in the test suite. Is this possible to do? If not, is there any way to write tests for this bug?

We have attached a diff of the fix with no tests.

Thanks,
Team Tahiti
diff -r 2672ec7e3228 lint.py
--- a/lint.py   Fri Dec 18 14:41:44 2009 +0100
+++ b/lint.py   Thu Mar 25 12:52:43 2010 -0400
@@ -41,7 +41,7 @@
 from logilab.common.interface import implements
 from logilab.common.textutils import splitstrip
 from logilab.common.fileutils import norm_open
-from logilab.common.ureports import Table, Text
+from logilab.common.ureports import Table, Text, Section
 from logilab.common.__pkginfo__ import version as common_version
 
 from logilab.astng import MANAGER, nodes
@@ -619,6 +619,10 @@
             old_stats = config.load_results(self.base_name)
             if self.config.reports:
                 self.make_reports(self.stats, old_stats)
+            # this is an elif since make_reports calls display_results, 
+            # and we don't want display_results called more than once
+            elif self.config.output_format == 'html':
+                self.reporter.display_results(Section())
             # save results if persistent run
             if self.config.persistent:
                 config.save_results(self.stats, self.base_name)
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to