Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant tests
Browse files Browse the repository at this point in the history
Since `black` is in your `.pre-commit-config.yaml`, having extra formatting tests is redundant + you would have to manage its version in two more places.
As for running `pre-commit run -a` on the CI this is done by the 'Pre-commit' job, which utilizes caching.
s-weigand committed Oct 14, 2020
1 parent fcbc1ff commit 52f8ce1
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.4.0
envlist = py{36,37,38,39},lint,check-formatting,manifest
envlist = py{36,37,38,39},lint,manifest
isolated_build = True

[testenv]
@@ -9,18 +9,8 @@ commands = python -m pytest {posargs}

[testenv:lint]
basepython = python3.8
deps =
pre-commit
commands = pre-commit run --all-files

; This env just runs `black` and fails tox if it's not formatted correctly.
; If this env fails on CI, run `tox -e format` locally in order to apply changes.
[testenv:check-formatting]
basepython = python3.8
deps = black==19.10b0
skip_install = true
commands =
black src tests --diff --check --config {toxinidir}/pyproject.toml
deps = pre-commit
commands = pre-commit run -a

[testenv:docs]
basepython = python3.8
@@ -35,13 +25,6 @@ deps = check-manifest
skip_install = true
commands = check-manifest

[testenv:format]
basepython = python3.8
deps = black==19.10b0
skip_install = true
commands =
black src tests --config {toxinidir}/pyproject.toml

[testenv:generate-badge]
basepython = python3.8
commands =
@@ -66,5 +49,5 @@ python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38, docs, lint, manifest, check-formatting
3.8: py38, docs, manifest
3.9: py39

0 comments on commit 52f8ce1

Please sign in to comment.