Skip to content

Commit

Permalink
fix: dev: tox, coverage, lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfit committed Dec 14, 2019
1 parent 4316b8b commit 4c45cc8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
11 changes: 8 additions & 3 deletions Makefile
Expand Up @@ -88,7 +88,9 @@ test:
tox -e default -- $(_PYTEST_OPTS) $(_PDB_OPTS)

test-all:
tox -e clean
tox --parallel=all
tox -e coverage

test-data:
# Move these to eyed3.nicfit.net
Expand All @@ -106,10 +108,13 @@ pkg-test-data:
tar czf ./build/${TEST_DATA_FILE} -C ./test ./eyeD3-test-data

coverage:
tox -e default,coverage
tox -e coverage

coverage-view: coverage
${BROWSER} build/tests/coverage/index.html;\
coverage-view:
@if [ ! -f build/tests/coverage/index.html ]; then \
${MAKE} coverage; \
fi
@${BROWSER} build/tests/coverage/index.html

docs:
rm -f docs/eyed3.rst
Expand Down
2 changes: 1 addition & 1 deletion eyed3/mp3/headers.py
Expand Up @@ -365,7 +365,7 @@ def decode(self, frame):


class LameHeader(dict):
""" Mp3 Info tag (AKA LAME Tag)
r""" Mp3 Info tag (AKA LAME Tag)
Lame (and some other encoders) write a tag containing various bits of info
about the options used at encode time. If available, the following are
Expand Down
18 changes: 10 additions & 8 deletions tox.ini
@@ -1,33 +1,35 @@
[tox]
envlist = clean, py{36,37,38}, coverage, lint
envlist = py{36,37,38}

[default]
python = python3.7

[testenv:default]
basepython = python3.7
lint: python3.7
coverage: python3.7
basepython = {[default]python}

[testenv:clean]
skipsdist = true
skip_install = true
commands = coverage erase

[testenv]
commands = coverage run --rcfile=setup.cfg --source ./eyed3 --append -m \
pytest {posargs:--verbose ./test}
commands = pytest {posargs:--verbose ./test}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements/test.txt

[testenv:coverage]
basepython = {[default]python}
commands =
coverage run --rcfile=setup.cfg --source ./eyed3 -m \
pytest {posargs:--verbose ./test}
coverage report --rcfile=setup.cfg
coverage html --rcfile=setup.cfg
depends = py{36,37}

[testenv:lint]
deps = flake8
skipsdist = true
commands = flake8 ./src/eyed3
commands = flake8 ./eyed3

[testenv:check-manifest]
deps = check-manifest
Expand Down

0 comments on commit 4c45cc8

Please sign in to comment.