1 new changeset in pytest-codecheckers:

http://bitbucket.org/RonnyPfannschmidt/pytest-codecheckers/changeset/35e51c4a7984/
changeset:   r24:35e51c4a7984
user:        RonnyPfannschmidt
date:        2011-01-20 22:02:08
summary:     code update, use ini file to list the checkers, make a opt-out 
option (breaks tests!)
affected #:  2 files (230 bytes)

--- a/codecheckers/plugin.py    Sat Nov 13 22:53:36 2010 +0100
+++ b/codecheckers/plugin.py    Thu Jan 20 22:02:08 2011 +0100
@@ -36,8 +36,11 @@
         self.name += '[code-check]'
 
     def collect(self):
-        checkers = py.test.config.getvalue('codecheck')
+        if self.config.option.no_codechecks:
+            return []
+        checkers = self.config.getini('codechecks')
         entrypoints = pkg_resources.iter_entry_points('codechecker')
+        #XXX: list wanted checkers we didnt get
         return [PyCodeCheckItem(ep, self) for ep in entrypoints if ep.name in 
checkers]
 
 
@@ -47,4 +50,5 @@
 
 
 def pytest_addoption(parser):
-    parser.addoption('--codecheck', action='append', default=[])
+    parser.addini('codechecks', type='args', help='listings of the codechecks 
to use')
+    parser.addoption('--no-codechecks', action='store_true')


--- a/tox.ini   Sat Nov 13 22:53:36 2010 +0100
+++ b/tox.ini   Thu Jan 20 22:02:08 2011 +0100
@@ -1,3 +1,5 @@
+[pytest]
+codechecks = pep8 pyflakes
 [tox]
 indexserver =
     default = http://pypi.testrun.org

Repository URL: https://bitbucket.org/RonnyPfannschmidt/pytest-codecheckers/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to