Add `pytest-cov` which automatically measures coverage while tests are
executing and update tox and ci build configuration accordingly.
Add configuration for coverage:
1. Enable analysing logical branches
2. Save coverage details as HTML for local development use
3. Configure the HTML output to include coverage context: on the
right-hand side of each covered code line there is an expandable
section which lists every test that ran that line.
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
These references were out-of-date as of #4951. Not sure why we were
listing these individually in the first place; it's not like we want to
be strict about docstrings in tests...
This plugin uses librosa to automatically calculate the BPM for a track.
It is based on the keyfinder plugin, and rounds the BPM to an int.
Co-authored-by: Adrian Sampson <adrian@radbox.org>
The new error <https://github.com/PyCQA/pep8-naming/pull/157> strikes me
as a little overzealous: while most exceptions are errors, there are
some Exception subclasses that are *not* properly considered errors
(e.g., when they're only a base class for other error classes).
As described in PyCQA/pycodestyle#598, pycodestyle has exposed a new
error for "ambiguous variable names." I really wish this project were
less eager to add new warnings of questionable value that are enabled by
default...
The code that relied on this in the tests was removed in 84c82cc44b
I don't think this was a good global option anyways, so I don't see us
returning to it.
This was discovered by @JesseWeinstein
- Add support for Python 3 testing.
- Add Python 3.3, 3.4 and 3.5 tests to Travis and AppVeyor.
- Allow arguments to be passed to tox from test matrix.
- Simplify tox configuration so that we now only have `test`, `flake8`
and `docs` tasks.
This adds the [flake8-future-import][f] plugin for flake8, which enforces the
standard set of `__future__` imports at the top of all Python files. This
revealed a fair number of files that need to be fixed.
To be revisited after #1887 is merged.
[f]: https://github.com/xZise/flake8-future-import