Commit graph

19 commits

Author SHA1 Message Date
Ian Cordasco
eac3fcfc42
Update mock.patch to use pycodestyle as well 2016-06-15 13:39:38 -05:00
Ian Lee
1db863e60a Updated package to use pycodestyle
This change was originally triggered by @gvanrossum requeesting
that pep8 (the tool) be renamed to avoid confusion with PEP-8
the document. This request is tracked at:

https://github.com/PyCQA/pycodestyle/issues/466
2016-05-31 11:02:09 -07:00
Ian Cordasco
7d40f525f0 Definitely fix bug reading options from config files
Previously we were not reading output_file or enable_extensions from
user provided configuration files. The configuration option name
provided to config_options needs to be hyphenated in order for pep8 to
recognize and parse out the option correctly. Also, the destination name
needs to match the configuration option name that pep8 looks for
otherwise it will raise an unhandled KeyError exception.
2016-02-11 09:41:14 -06:00
Ian Cordasco
bf19122741 Merge branch 'bug/67' into 'master'
Remove enabled extensions from `options.select`

When taking advantage of the --select flag for off-by-default
extensions, we neglected to take into account the fact that leaving the
extension names in the select list would cause different behaviour in
pep8. This should remedy this.

Related to GitLab bug #67

----

cc @joe-gordon0

See merge request !37
2015-09-28 01:32:11 +00:00
Ian Cordasco
0c0eadc0a0 Add better logic for loading entry points
As noted in the code, setuptools 11.3 deprecated EntryPoint.load and
its require parameter. Starting with 11.3 the preferred way is use
EntryPoint.require and EntryPoint.resolve as necessary. Unfortunately,
those methods do not exist in all versions of setuptools. So we have
to check for them and use them when they're available. Otherwise, we
fallback to using EntryPoint.load with the require parameter.

Closes #59
Closes #90
2015-09-27 14:11:17 -05:00
Ian Cordasco
96cb23e2e7 Add --enable-extensions flag to Flake8
This new flag is added so that off-by-default extensions can be enabled
without using --select which (currently) causes several problems with
pep8's rule engine. This also adds support to the --enable-extensions
flag to be specified as a multi-line config option in an appropriate
config file.

Closes GitLab #67
2015-09-27 10:08:23 -05:00
Ian Cordasco
9d734158ca Add tests around the OSError retry logic
This updates our retry logic to be more specific in catching OSErrors
and it adds specific tests to show that it works and properly
re-initializes the StyleGuide with the pep8.StandardReport class so we
can fall back on serial behaviour gracefully.

Closes #74
2015-08-22 19:47:42 -05:00
Ian Cordasco
b0f30f97fb Fix flake8 tests using mock to work with 1.1.x branch 2015-07-10 09:34:49 -05:00
Ian Cordasco
a6fc242c5e Slightly simplify our conditionals
Test warnings by default
2015-03-07 20:21:58 -06:00
Ian Cordasco
b301532636 Add ability to turn checks off by default 2014-12-18 15:11:26 -06:00
Ian Cordasco
e6cb9528d3 Disable multiprocessing when using stdin
Fixes #165
2014-09-12 22:36:37 -05:00
Lukasz Dobrzanski
c3d7e68a2b Use unittest.mock if available
Use unittest.mock https://docs.python.org/3/library/unitetst.mock.html
starting from >= Python 3.3
2014-09-10 01:15:01 +01:00
Florent Xicluna
573a217d6c Fix the test suite 2014-05-23 15:55:59 +02:00
Florent Xicluna
94b59d327e New option --jobs to spawn multiple processes in parallel; closes #146 2014-04-27 00:22:50 +02:00
Florent Xicluna
b89fc0dae8 Fix the errors reported by flake8 2014-04-26 23:40:23 +02:00
Florent Xicluna
7b36756428 Fix test on Python 2.5 2014-03-31 00:30:38 +02:00
Ian Cordasco
1d665700e5 These should have been committed over a week ago. 2013-07-27 21:48:36 -05:00
Ian Cordasco
d3b8f9a284 A slow start towards rewriting the tests 2013-07-04 23:41:46 -04:00
Ian Cordasco
1e59072600 Start new tests
run_tests will collect and run the tests on python 2.6+ (need to test 2.5)
without nose.
2013-07-04 13:47:01 -04:00