teo-pytest-config-shared 0.1.0__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.
@@ -0,0 +1,10 @@
1
+ from importlib.resources import files
2
+ from pathlib import Path
3
+
4
+
5
+ def config_path() -> Path:
6
+ return Path(str(files(__package__).joinpath("pytest.ini")))
7
+
8
+
9
+ def _cli() -> None:
10
+ print(config_path())
@@ -0,0 +1,4 @@
1
+ [pytest]
2
+ asyncio_mode = auto
3
+ testpaths = tests
4
+ addopts = --strict-markers
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.4
2
+ Name: teo-pytest-config-shared
3
+ Version: 0.1.0
4
+ Summary: Shared pytest configuration for teo-garcia Python templates
5
+ Project-URL: Repository, https://github.com/teo-garcia/pytest-config-shared
6
+ Author: teo-garcia
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Keywords: coverage,pytest,python,shared,testing
10
+ Requires-Python: >=3.12
11
+ Description-Content-Type: text/markdown
12
+
13
+ <div align="center">
14
+
15
+ # teo-pytest-config-shared
16
+
17
+ **Shared pytest and coverage configuration for teo-garcia Python templates**
18
+
19
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
20
+ [![PyPI](https://img.shields.io/pypi/v/teo-pytest-config-shared?color=blue)](https://pypi.org/project/teo-pytest-config-shared)
21
+ [![Python](https://img.shields.io/badge/Python-3.12+-3776AB?logo=python&logoColor=white)](https://python.org)
22
+
23
+ Part of the [@teo-garcia/templates](https://github.com/teo-garcia/templates) ecosystem
24
+
25
+ </div>
26
+
27
+ ---
28
+
29
+ ## Settings
30
+
31
+ | Setting | Value |
32
+ | --- | --- |
33
+ | **asyncio_mode** | auto |
34
+ | **testpaths** | tests |
35
+ | **addopts** | --strict-markers |
36
+ | **coverage omit** | tests/* |
37
+ | **coverage fail_under** | 80 |
38
+
39
+ ---
40
+
41
+ ## Requirements
42
+
43
+ - Python 3.12+
44
+ - pytest 8.3+
45
+ - pytest-cov 6.0+
46
+
47
+ ---
48
+
49
+ ## Usage
50
+
51
+ Install as a dev dependency:
52
+
53
+ ```bash
54
+ uv add --dev teo-pytest-config-shared
55
+ ```
56
+
57
+ Get the path to the installed config file:
58
+
59
+ ```bash
60
+ uv run teo-pytest-config-path
61
+ ```
62
+
63
+ pytest does not support config inheritance natively. The recommended pattern is to copy the canonical settings into your `pyproject.toml` and extend them:
64
+
65
+ ```toml
66
+ [tool.pytest.ini_options]
67
+ asyncio_mode = "auto"
68
+ testpaths = ["tests"]
69
+ addopts = "--strict-markers"
70
+ markers = ["e2e: end-to-end tests requiring live services"]
71
+
72
+ [tool.coverage.run]
73
+ source = ["app"]
74
+ omit = ["tests/*"]
75
+
76
+ [tool.coverage.report]
77
+ show_missing = true
78
+ fail_under = 80
79
+ ```
80
+
81
+ Coverage settings belong in `pyproject.toml`, `.coveragerc`, `setup.cfg`, or
82
+ `tox.ini`; the exported `pytest.ini` intentionally contains only pytest-native
83
+ options. Use `teo-pytest-config-path` to inspect the canonical pytest baseline
84
+ whenever you update your project config.
85
+
86
+ ---
87
+
88
+ ## Related Packages
89
+
90
+ | Package | Description |
91
+ | --- | --- |
92
+ | `teo-ruff-config-shared` | Ruff lint and format settings |
93
+ | `teo-mypy-config-shared` | mypy type-checking settings |
94
+
95
+ ---
96
+
97
+ ## License
98
+
99
+ MIT
100
+
101
+ ---
102
+
103
+ <div align="center">
104
+ <sub>Built by <a href="https://github.com/teo-garcia">teo-garcia</a></sub>
105
+ </div>
@@ -0,0 +1,7 @@
1
+ teo_pytest_config_shared/__init__.py,sha256=TlmpPO0KmSMlY4uMv-jM73oAaScUQ78KxDWTfREXuXw,203
2
+ teo_pytest_config_shared/pytest.ini,sha256=tOP-SZ5aUxsAch1Y_4rtSoHZbnvNtpcch3uoPdGUK6g,74
3
+ teo_pytest_config_shared-0.1.0.dist-info/METADATA,sha256=UAjKy4imgbcejV0gN54SzRM1eC-J1tMZS_y3RZafttk,2422
4
+ teo_pytest_config_shared-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
5
+ teo_pytest_config_shared-0.1.0.dist-info/entry_points.txt,sha256=cy6VrfDdbl8M2c8VynJVpiCBCx25NQY3aBQLCU-Kno4,73
6
+ teo_pytest_config_shared-0.1.0.dist-info/licenses/LICENSE,sha256=QNV0JhzwZUxacjFgu2ZwiG8MgswDGrKaA-oulXd5WDI,1062
7
+ teo_pytest_config_shared-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ teo-pytest-config-path = teo_pytest_config_shared:_cli
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) teo-garcia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.