[TIP] pylinrc in (py.test) testing directories

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Oct 30 01:20:45 PDT 2014


On 27 octobre 12:08, Floris Bruynooghe wrote:
> > I'm trying out pylint for a new project and have a question about it's
> > configuration.  As I understand it one can put a pylintrc file in a
> > python package to customise the errors reported.  I thought this would
> > be ideal to silence missing-docstrings in test directories, however
> > this doesn't work with a typical py.test project layout:
> >
> > setup.py
> > pylintrc
> > my_pkg/
> > my_pkg/__init__.py
> > my_pkg/foo.py
> > testing/
> > testing/pylintrc
> > testing/test_foo.py
> >
> > Notice the lack of __init__.py in the testing/ directory, AFAIK this
> > is usually recommended in py.test so that it is not picked up by
> > setuptools as a package and installed.  However it seems this means
> > the pylintrc file is not used.

Notice the pylintrc file is picked once for the whole analysis, ie you can't
have one pylintrc per sub-packages / sub-directories.

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the testing-in-python mailing list