pytest-everyfunc 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytest-everyfunc
3
+ Version: 0.1.2
4
+ Summary: A pytest plugin to detect completely untested functions using coverage
5
+ Author-email: Johannes Buchner <johannes.buchner.acad@gmx.com>
6
+ License-Expression: BSD-2-Clause
7
+ Project-URL: Homepage, https://github.com/JohannesBuchner/pytest-everyfunc
8
+ Project-URL: Documentation, https://github.com/JohannesBuchner/pytest-everyfunc
9
+ Project-URL: Repository, https://github.com/JohannesBuchner/pytest-everyfunc
10
+ Project-URL: Issues, https://github.com/JohannesBuchner/pytest-everyfunc/issues
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Framework :: Pytest
16
+ Description-Content-Type: text/x-rst
17
+ Requires-Dist: pytest
18
+ Requires-Dist: coverage
19
+ Requires-Dist: pytest-cov
20
+
21
+ pytest-everyfunc
22
+ ================
23
+
24
+ A pytest plugin to detect completely untested functions using coverage.
25
+
26
+ Motivation
27
+ ----------
28
+
29
+ If you add pytest-everyfunc to your CI, you can prevent yourself from
30
+ checking in code that adds functions without tests.
31
+
32
+ Installation
33
+ ------------
34
+
35
+ ::
36
+
37
+ $ pip install pytest-everyfunc
38
+
39
+ Usage
40
+ -----
41
+
42
+ ::
43
+
44
+ $ pytest --cov=mypackage --fail-on-untested
45
+ ...
46
+ tests/test_script.py ........ [100%]
47
+ mypackage/foo.py:253: untested function: rv_logpdf
48
+ mypackage/bar.py:717: untested function: norms
49
+ mypackage/baz.py:86: untested function: prior_predictive_check_plot
50
+ Exit: Untested functions found.
51
+
52
+
53
+ The output shows the functions that were not called.
54
+
55
+ If --fail-on-untested is set, then the exit code is 32 (regardless whether tests succeed).
56
+
57
+ ::
58
+
59
+ $ echo $?
60
+ 32
61
+
62
+ git hook
63
+ --------
64
+
65
+ add to .git/hooks/pre-commit the pytest command above.
@@ -11,12 +11,16 @@ checking in code that adds functions without tests.
11
11
 
12
12
  Installation
13
13
  ------------
14
+
14
15
  ::
15
- $ pip install pytest-everyfunc pytest-cov coverage
16
+
17
+ $ pip install pytest-everyfunc
16
18
 
17
19
  Usage
18
20
  -----
19
- ::
21
+
22
+ ::
23
+
20
24
  $ pytest --cov=mypackage --fail-on-untested
21
25
  ...
22
26
  tests/test_script.py ........ [100%]
@@ -31,10 +35,11 @@ The output shows the functions that were not called.
31
35
  If --fail-on-untested is set, then the exit code is 32 (regardless whether tests succeed).
32
36
 
33
37
  ::
38
+
34
39
  $ echo $?
35
40
  32
36
41
 
37
42
  git hook
38
43
  --------
39
44
 
40
- add to .git/hooks/pre-commit the command above.
45
+ add to .git/hooks/pre-commit the pytest command above.
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pytest-everyfunc"
7
+ version = "0.1.2"
8
+ description = "A pytest plugin to detect completely untested functions using coverage"
9
+ authors = [{name = "Johannes Buchner", email = "johannes.buchner.acad@gmx.com"}]
10
+ dependencies = ["pytest", "coverage", "pytest-cov"]
11
+ readme = "README.rst"
12
+ license = "BSD-2-Clause"
13
+
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "Topic :: Software Development :: Testing",
18
+ "Programming Language :: Python :: 3",
19
+ "Framework :: Pytest"
20
+ ]
21
+ [project.urls]
22
+ Homepage = "https://github.com/JohannesBuchner/pytest-everyfunc"
23
+ Documentation = "https://github.com/JohannesBuchner/pytest-everyfunc"
24
+ Repository = "https://github.com/JohannesBuchner/pytest-everyfunc"
25
+ Issues = "https://github.com/JohannesBuchner/pytest-everyfunc/issues"
26
+
27
+ [project.entry-points.pytest11]
28
+ pytest_everyfunc = "pytest_everyfunc.plugin"
@@ -1,3 +1,17 @@
1
+ """A pytest plugin to detect completely untested functions using coverage"""
2
+
3
+ """
4
+ Copyright 2025 Johannes Buchner
5
+
6
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9
+
10
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13
+
14
+ """
1
15
  import ast
2
16
  import os
3
17
  import sys
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytest-everyfunc
3
+ Version: 0.1.2
4
+ Summary: A pytest plugin to detect completely untested functions using coverage
5
+ Author-email: Johannes Buchner <johannes.buchner.acad@gmx.com>
6
+ License-Expression: BSD-2-Clause
7
+ Project-URL: Homepage, https://github.com/JohannesBuchner/pytest-everyfunc
8
+ Project-URL: Documentation, https://github.com/JohannesBuchner/pytest-everyfunc
9
+ Project-URL: Repository, https://github.com/JohannesBuchner/pytest-everyfunc
10
+ Project-URL: Issues, https://github.com/JohannesBuchner/pytest-everyfunc/issues
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Framework :: Pytest
16
+ Description-Content-Type: text/x-rst
17
+ Requires-Dist: pytest
18
+ Requires-Dist: coverage
19
+ Requires-Dist: pytest-cov
20
+
21
+ pytest-everyfunc
22
+ ================
23
+
24
+ A pytest plugin to detect completely untested functions using coverage.
25
+
26
+ Motivation
27
+ ----------
28
+
29
+ If you add pytest-everyfunc to your CI, you can prevent yourself from
30
+ checking in code that adds functions without tests.
31
+
32
+ Installation
33
+ ------------
34
+
35
+ ::
36
+
37
+ $ pip install pytest-everyfunc
38
+
39
+ Usage
40
+ -----
41
+
42
+ ::
43
+
44
+ $ pytest --cov=mypackage --fail-on-untested
45
+ ...
46
+ tests/test_script.py ........ [100%]
47
+ mypackage/foo.py:253: untested function: rv_logpdf
48
+ mypackage/bar.py:717: untested function: norms
49
+ mypackage/baz.py:86: untested function: prior_predictive_check_plot
50
+ Exit: Untested functions found.
51
+
52
+
53
+ The output shows the functions that were not called.
54
+
55
+ If --fail-on-untested is set, then the exit code is 32 (regardless whether tests succeed).
56
+
57
+ ::
58
+
59
+ $ echo $?
60
+ 32
61
+
62
+ git hook
63
+ --------
64
+
65
+ add to .git/hooks/pre-commit the pytest command above.
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pytest-everyfunc
3
- Version: 0.1.0
4
- Summary: A pytest plugin to detect completely untested functions using coverage
5
- Author-email: Johannes Buchner <johannes.buchner.acad@gmx.com>
6
- Requires-Dist: pytest
7
- Requires-Dist: coverage
@@ -1,13 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "pytest-everyfunc"
7
- version = "0.1.0"
8
- description = "A pytest plugin to detect completely untested functions using coverage"
9
- authors = [{name = "Johannes Buchner", email = "johannes.buchner.acad@gmx.com"}]
10
- dependencies = ["pytest", "coverage"]
11
-
12
- [project.entry-points.pytest11]
13
- pytest_everyfunc = "pytest_everyfunc.plugin"
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pytest-everyfunc
3
- Version: 0.1.0
4
- Summary: A pytest plugin to detect completely untested functions using coverage
5
- Author-email: Johannes Buchner <johannes.buchner.acad@gmx.com>
6
- Requires-Dist: pytest
7
- Requires-Dist: coverage