summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-08-07 10:31:33 -0400
committerJason R. Coombs <jaraco@jaraco.com>2022-08-07 10:31:33 -0400
commit17fda7ef4e4d4bf22ad2d0ae634defecf8b7e886 (patch)
treecd24488e5f0f3253df45ed7ac6183ab56564325f
parentf7cff188413bcf94961c7cbef3947ca13747ac3b (diff)
downloadpython-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.toml9
-rw-r--r--pytest.ini13
-rw-r--r--tox.ini9
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"
diff --git a/pytest.ini b/pytest.ini
index a388360c..56dcdec4 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -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
diff --git a/tox.ini b/tox.ini
index 952c9b58..5facd6b9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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