pytest-api-cov 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
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.
- pytest_api_cov/cli.py +1 -1
- pytest_api_cov/plugin.py +17 -6
- {pytest_api_cov-1.0.1.dist-info → pytest_api_cov-1.0.2.dist-info}/METADATA +10 -10
- {pytest_api_cov-1.0.1.dist-info → pytest_api_cov-1.0.2.dist-info}/RECORD +7 -7
- {pytest_api_cov-1.0.1.dist-info → pytest_api_cov-1.0.2.dist-info}/WHEEL +0 -0
- {pytest_api_cov-1.0.1.dist-info → pytest_api_cov-1.0.2.dist-info}/entry_points.txt +0 -0
- {pytest_api_cov-1.0.1.dist-info → pytest_api_cov-1.0.2.dist-info}/licenses/LICENSE +0 -0
pytest_api_cov/cli.py
CHANGED
pytest_api_cov/plugin.py
CHANGED
@@ -65,10 +65,21 @@ def auto_discover_app() -> Optional[Any]:
|
|
65
65
|
f"✅ Auto-discovered {type(app).__name__} app in {filename} as '{attr_name}'"
|
66
66
|
)
|
67
67
|
# Check if there are more files to scan
|
68
|
-
remaining_files = [
|
68
|
+
remaining_files = [
|
69
|
+
f
|
70
|
+
for f in [
|
71
|
+
p[0]
|
72
|
+
for p in common_patterns[common_patterns.index((filename, attr_names)) :]
|
73
|
+
]
|
74
|
+
if os.path.exists(f) and f != filename
|
75
|
+
]
|
69
76
|
if remaining_files:
|
70
|
-
logger.debug(
|
71
|
-
|
77
|
+
logger.debug(
|
78
|
+
f"> Note: Also found files {remaining_files} but using first discovered app"
|
79
|
+
)
|
80
|
+
logger.debug(
|
81
|
+
"> To use a different app, create a conftest.py with an 'app' fixture"
|
82
|
+
)
|
72
83
|
return app
|
73
84
|
else:
|
74
85
|
logger.debug(f"> Found '{attr_name}' in {filename} but it's not a supported framework")
|
@@ -80,9 +91,9 @@ def auto_discover_app() -> Optional[Any]:
|
|
80
91
|
# If we get here, no apps were found
|
81
92
|
if found_files:
|
82
93
|
logger.debug(f"> Found files {found_files} but no supported Flask/FastAPI apps in them")
|
83
|
-
logger.debug(
|
84
|
-
logger.debug(
|
85
|
-
|
94
|
+
logger.debug("> If your app is in one of these files with a different variable name,")
|
95
|
+
logger.debug("> create a conftest.py with an 'app' fixture to specify it")
|
96
|
+
|
86
97
|
logger.debug("> No app auto-discovered")
|
87
98
|
return None
|
88
99
|
|
@@ -1,19 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pytest-api-cov
|
3
|
-
Version: 1.0.
|
4
|
-
Summary:
|
3
|
+
Version: 1.0.2
|
4
|
+
Summary: Pytest Plugin to provide API Coverage statistics for Python Web Frameworks
|
5
5
|
Author-email: Barnaby Gill <barnabasgill@gmail.com>
|
6
6
|
License: Apache-2.0
|
7
7
|
License-File: LICENSE
|
8
8
|
Requires-Python: >=3.10
|
9
|
-
Requires-Dist: fastapi>=0.
|
10
|
-
Requires-Dist: flask>=
|
11
|
-
Requires-Dist: httpx>=0.
|
12
|
-
Requires-Dist: pydantic>=2.
|
13
|
-
Requires-Dist: pytest>=
|
14
|
-
Requires-Dist: rich>=
|
15
|
-
Requires-Dist: starlette>=0.
|
16
|
-
Requires-Dist: tomli>=
|
9
|
+
Requires-Dist: fastapi>=0.68.0
|
10
|
+
Requires-Dist: flask>=2.0.0
|
11
|
+
Requires-Dist: httpx>=0.20.0
|
12
|
+
Requires-Dist: pydantic>=2.0.0
|
13
|
+
Requires-Dist: pytest>=6.0.0
|
14
|
+
Requires-Dist: rich>=10.0.0
|
15
|
+
Requires-Dist: starlette>=0.14.0
|
16
|
+
Requires-Dist: tomli>=1.2.0
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
|
19
19
|
# pytest-api-cov
|
@@ -1,13 +1,13 @@
|
|
1
1
|
pytest_api_cov/__init__.py,sha256=7ZX-XIlYwdB0AkSSaXG2O6mah3CBCjZGTiBSEf5dTqk,177
|
2
|
-
pytest_api_cov/cli.py,sha256
|
2
|
+
pytest_api_cov/cli.py,sha256=TCnldhRBi9BMLaPrnp7sfoWNc0Ktu8XnoRQKUuXFGWo,7186
|
3
3
|
pytest_api_cov/config.py,sha256=51GaJgAtctAcNb2F-7Q65qZuNusf3_s1-4bE-AWv5QE,3323
|
4
4
|
pytest_api_cov/frameworks.py,sha256=5d6wnEsb2BykPtpnpkv98GMPuyoG4elXRJ7vtGHF06A,3228
|
5
5
|
pytest_api_cov/models.py,sha256=YiXLiEEyNREiodzn1pGqSNIHrm3zV6kFn0XgyN8_8Rs,4893
|
6
|
-
pytest_api_cov/plugin.py,sha256=
|
6
|
+
pytest_api_cov/plugin.py,sha256=rZVTvhqKv5GCIbwgFRH3KcrwNXdecFDRrtbMepZfjs8,16118
|
7
7
|
pytest_api_cov/pytest_flags.py,sha256=OX1NMcQHfI9uyPrZXj0Q_VG1daU8uKKB4sY-4JLm220,2175
|
8
8
|
pytest_api_cov/report.py,sha256=VxfWag20V8o9ArbxOkR_gWQ2TE-sthrS0PCJvn4YCSU,6642
|
9
|
-
pytest_api_cov-1.0.
|
10
|
-
pytest_api_cov-1.0.
|
11
|
-
pytest_api_cov-1.0.
|
12
|
-
pytest_api_cov-1.0.
|
13
|
-
pytest_api_cov-1.0.
|
9
|
+
pytest_api_cov-1.0.2.dist-info/METADATA,sha256=jR8gMyw5frvKQzWeyPrjHmACqa1S6xPZuYXgoshK9Vc,11303
|
10
|
+
pytest_api_cov-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
11
|
+
pytest_api_cov-1.0.2.dist-info/entry_points.txt,sha256=hWqEhsBKzbwSwcxCzKgSA8NElQxk0K4PKERrYsi3csk,110
|
12
|
+
pytest_api_cov-1.0.2.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
13
|
+
pytest_api_cov-1.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|