PEP8 conformance tests complain about missing files #2072

mdboom opened this Issue May 28, 2013 · 2 comments


None yet

2 participants

mdboom commented May 28, 2013

There are some setuptools "stub" files for C extensions that only get exist when the C dependencies are present on the system. Unfortunately, these stub files are not PEP8 compliant, and making them PEP8 compliant would probably require patching setuptools.

Here's an example:

def __bootstrap__():
   global __bootstrap__, __loader__, __file__
   import sys, pkg_resources, imp
   __file__ = pkg_resources.resource_filename(__name__,'')
   __loader__ = None; del __bootstrap__, __loader__

The PEP8 conformance test will fail if these files are present, so I excluded them. However, since they don't exist on Travis, we now get this over there:

ERROR: matplotlib.tests.test_coding_standards.test_pep8_conformance
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/nose/", line 197, in runTest
  File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/tests/", line 231, in test_pep8_conformance
    '{}'.format('\n  '.join(unexpectedly_good)))
ValueError: Some exclude patterns were unnecessary as the files they pointed to either passed the PEP8 tests or do not point to a file:

I think I'd prefer it if it was just silent if an excluded file is missing.

@pelson: What do you think?

pelson commented May 29, 2013

I submitted a PR to distribute to fix the PEP8 problem, but it was rejected on the grounds of mirroring v0.7 of setuptools (

I encountered this problem when writing the test in the first place and thought I'd excluded all of the C wrappers, but clearly I've missed some. Just add the necessary files to the list at 😉

mdboom commented May 29, 2013

Ah -- I missed that other list the first time. I have fixed this in 8eef95e

@mdboom mdboom closed this May 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment