diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-08-07 10:31:33 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-08-07 10:31:33 -0400 |
| commit | 17fda7ef4e4d4bf22ad2d0ae634defecf8b7e886 (patch) | |
| tree | cd24488e5f0f3253df45ed7ac6183ab56564325f | |
| parent | f7cff188413bcf94961c7cbef3947ca13747ac3b (diff) | |
| download | python-setuptools-git-17fda7ef4e4d4bf22ad2d0ae634defecf8b7e886.tar.gz | |
Add pytest-flake8 and pytest-black and pytest-cov to test lint and style and coverage
| -rw-r--r-- | pyproject.toml | 9 | ||||
| -rw-r--r-- | pytest.ini | 13 | ||||
| -rw-r--r-- | tox.ini | 9 |
3 files changed, 31 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml index 0097e9f6..e6863cff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,11 @@ [tool.black] skip-string-normalization = true + +[tool.pytest-enabler.black] +addopts = "--black" + +[tool.pytest-enabler.flake8] +addopts = "--flake8" + +[tool.pytest-enabler.cov] +addopts = "--cov" @@ -1,6 +1,19 @@ [pytest] addopts=--doctest-modules filterwarnings= + # Suppress deprecation warning in flake8 + ignore:SelectableGroups dict interface is deprecated::flake8 + + # shopkeep/pytest-black#55 + ignore:<class 'pytest_black.BlackItem'> is not using a cooperative constructor:pytest.PytestDeprecationWarning + ignore:The \(fspath. py.path.local\) argument to BlackItem is deprecated.:pytest.PytestDeprecationWarning + ignore:BlackItem is an Item subclass and should not be a collector:pytest.PytestWarning + + # tholo/pytest-flake8#83 + ignore:<class 'pytest_flake8.Flake8Item'> is not using a cooperative constructor:pytest.PytestDeprecationWarning + ignore:The \(fspath. py.path.local\) argument to Flake8Item is deprecated.:pytest.PytestDeprecationWarning + ignore:Flake8Item is an Item subclass and should not be a collector:pytest.PytestWarning + # acknowledge that TestDistribution isn't a test ignore:cannot collect test class 'TestDistribution' ignore:Fallback spawn triggered @@ -6,6 +6,15 @@ toxworkdir={env:TOX_WORK_DIR:.tox} [testenv] deps = pytest + + pytest-flake8 + # workaround for tholo/pytest-flake8#87 + flake8 < 5 + + pytest-black + pytest-cov + pytest-enabler >= 1.3 + jaraco.envs>=2.4 jaraco.path path |
