This stops the broken mozlog plugin being loaded, which was preventing
us updating to newer pytest. Other unused plugins have also been
disabled, to avoid future issues and improve pytest load times.
Before this change running pytest with no arguments took 51 seconds
to just collect the list of tests to run (`pytest --collect-only`),
since the entire source directory was scanned (including the 18,000
files in `node_modules`).
Now it takes only 3.7 seconds.
Initially these will continue to be run in Jenkins, however later they
will be converted to run on Travis along with the existing local
Selenium tests.
Since it's actually needed to catch unused imports, albeit it's a bit
more strict than it used to be, so required some fix-ups before it could
be re-enabled.
Now that we're on Django 1.10 (which doesn't add unused imports) and the
old migrations have been removed we no longer need to ignore them and
risk hiding real breakage.
treeherder/config/wsgi.py:17:1: E402 module level import not at top of file
treeherder/config/wsgi.py:18:1: E402 module level import not at top of file
These forbid common constructs, notably
if (foo and
bar):
which has no basis in PEP8 or sanity. In modern pyflakes only E129 would have to be permitted
but Ubuntu 14.04 has an older version which lumps this in with some other cases in E125.
The MPL 2.0 terms state that as long as a LICENSE file is present, the
per-file header text is not required. See "Exhibit A" at the end of:
https://www.mozilla.org/MPL/2.0/
Since it only speeds up parsing by a few percent of total runtime, and
is therefore not worth the added complexity for deployment and local
hack-test-debug cycles when working on the log parser.
The .gitignore and update.py entries will be removed in a later commit,
once the stage/prod src directories have been cleaned up.
We're checking this in so we have a known good starting point in the
chain of trust. It also simplifies our deployment requirements.
peep.py was taken from:
https://github.com/erikrose/peep/archive/2.2.tar.gz
The only alteration made was the addition of the licence block at the
top of the file, taken from LICENCE in the peep repo.
* Turn on warnings in test code.
* Set strictness explicitly to medium, since it's currently at 'None'.
* Explicitly set the list of requirements files, since otherwise
unnecessary packages will be installed, slowing down the landscape.io
run.
* Disable pep8/pyflakes, since they are already run as part of the
Travis job.
Defining 'ignore' ourselves overwrites the default ignore list. This
adds in the current pep8 ignore list, to ensure we don't re-enable noisy
error types inadvertently.