Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install pytest-flakes

How to install pytest-flakes

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install pytest-flakes
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1 Available View build log
 
Imports
Lastest release
version 0.1 on Jan 9th, 2014

py.test plugin for efficiently checking python source with pyflakes.

Usage

install via:

pip install pytest-flakes

if you then type:

py.test --flakes

every file ending in .py will be discovered and run through pyflakes, starting from the command line arguments.

Configuring pyflakes options per project and file

You may configure pyflakes-checking options for your project by adding an flakes-ignore entry to your setup.cfg or setup.cfg file like this:

# content of setup.cfg
[pytest]
flakes-ignore = UnusedImport

This would globally prevent complaints about two whitespace issues. Rerunning with the above example will now look better:

$ py.test -q --flakes
collecting ... collected 1 items
.
1 passed in 0.01 seconds

If you have some files where you want to specifically ignore some errors or warnings you can start a flakes-ignore line with a glob-pattern and a space-separated list of codes:

# content of setup.cfg
[pytest]
flakes-ignore =
    *.py UnusedImport
    doc/conf.py ALL

Running pyflakes checks and no other tests

You can also restrict your test run to only perform "flakes" tests and not any other tests by typing:

py.test --flakes -k flakes

This will only run tests that are marked with the "flakes" keyword which is added for the flakes test items added by this plugin.

Notes

The repository of this plugin is at https://github.com/fschulze/pytest-flakes

For more info on py.test see http://pytest.org

The code is partially based on Ronny Pfannschmidt's pytest-codecheckers plugin and Holger Krekel's pytest-pep8.

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.