pytest-glaze 0.1.0__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.
- pytest_glaze-0.1.0/.gitignore +262 -0
- pytest_glaze-0.1.0/.python-version +1 -0
- pytest_glaze-0.1.0/LICENSE +21 -0
- pytest_glaze-0.1.0/Makefile +63 -0
- pytest_glaze-0.1.0/PKG-INFO +390 -0
- pytest_glaze-0.1.0/README.md +342 -0
- pytest_glaze-0.1.0/demo.svg +141 -0
- pytest_glaze-0.1.0/pyproject.toml +63 -0
- pytest_glaze-0.1.0/pyrightconfig.json +6 -0
- pytest_glaze-0.1.0/pytest_glaze.py +810 -0
- pytest_glaze-0.1.0/tests/conftest.py +17 -0
- pytest_glaze-0.1.0/tests/corpus/conftest.py +40 -0
- pytest_glaze-0.1.0/tests/corpus/test_assertions.py +214 -0
- pytest_glaze-0.1.0/tests/corpus/test_capture.py +124 -0
- pytest_glaze-0.1.0/tests/corpus/test_exceptions.py +126 -0
- pytest_glaze-0.1.0/tests/corpus/test_fixtures.py +87 -0
- pytest_glaze-0.1.0/tests/corpus/test_parametrize.py +111 -0
- pytest_glaze-0.1.0/tests/corpus/test_skips.py +83 -0
- pytest_glaze-0.1.0/tests/corpus/test_warnings.py +106 -0
- pytest_glaze-0.1.0/tests/test_colorizer.py +430 -0
- pytest_glaze-0.1.0/tests/test_parsers.py +337 -0
- pytest_glaze-0.1.0/tests/test_plugin.py +179 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# macOS System Files
|
|
7
|
+
.DS_Store
|
|
8
|
+
.AppleDouble
|
|
9
|
+
.LSOverride
|
|
10
|
+
**/._*
|
|
11
|
+
|
|
12
|
+
# Python Byte-compiled / optimized / DLL files
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.py[cod]
|
|
15
|
+
*$py.class
|
|
16
|
+
|
|
17
|
+
# C extensions
|
|
18
|
+
*.so
|
|
19
|
+
|
|
20
|
+
# Distribution / packaging
|
|
21
|
+
.Python
|
|
22
|
+
build/
|
|
23
|
+
develop-eggs/
|
|
24
|
+
dist/
|
|
25
|
+
downloads/
|
|
26
|
+
eggs/
|
|
27
|
+
.eggs/
|
|
28
|
+
lib/
|
|
29
|
+
lib64/
|
|
30
|
+
parts/
|
|
31
|
+
sdist/
|
|
32
|
+
var/
|
|
33
|
+
wheels/
|
|
34
|
+
share/python-wheels/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
.installed.cfg
|
|
37
|
+
*.egg
|
|
38
|
+
MANIFEST
|
|
39
|
+
|
|
40
|
+
# Environments
|
|
41
|
+
.env
|
|
42
|
+
.venv
|
|
43
|
+
env/
|
|
44
|
+
venv/
|
|
45
|
+
ENV/
|
|
46
|
+
env.bak/
|
|
47
|
+
venv.bak/
|
|
48
|
+
|
|
49
|
+
# IDEs
|
|
50
|
+
.vscode/
|
|
51
|
+
.idea/
|
|
52
|
+
# C extensions
|
|
53
|
+
*.so
|
|
54
|
+
|
|
55
|
+
# Distribution / packaging
|
|
56
|
+
.Python
|
|
57
|
+
build/
|
|
58
|
+
develop-eggs/
|
|
59
|
+
dist/
|
|
60
|
+
downloads/
|
|
61
|
+
eggs/
|
|
62
|
+
.eggs/
|
|
63
|
+
lib/
|
|
64
|
+
lib64/
|
|
65
|
+
parts/
|
|
66
|
+
sdist/
|
|
67
|
+
var/
|
|
68
|
+
wheels/
|
|
69
|
+
share/python-wheels/
|
|
70
|
+
*.egg-info/
|
|
71
|
+
.installed.cfg
|
|
72
|
+
*.egg
|
|
73
|
+
MANIFEST
|
|
74
|
+
|
|
75
|
+
# PyInstaller
|
|
76
|
+
# Usually these files are written by a python script from a template
|
|
77
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
78
|
+
*.manifest
|
|
79
|
+
*.spec
|
|
80
|
+
|
|
81
|
+
# Installer logs
|
|
82
|
+
pip-log.txt
|
|
83
|
+
pip-delete-this-directory.txt
|
|
84
|
+
|
|
85
|
+
# Unit test / coverage reports
|
|
86
|
+
htmlcov/
|
|
87
|
+
.tox/
|
|
88
|
+
.nox/
|
|
89
|
+
.coverage
|
|
90
|
+
.coverage.*
|
|
91
|
+
.cache
|
|
92
|
+
nosetests.xml
|
|
93
|
+
coverage.xml
|
|
94
|
+
*.cover
|
|
95
|
+
*.py.cover
|
|
96
|
+
.hypothesis/
|
|
97
|
+
.pytest_cache/
|
|
98
|
+
cover/
|
|
99
|
+
|
|
100
|
+
# Translations
|
|
101
|
+
*.mo
|
|
102
|
+
*.pot
|
|
103
|
+
|
|
104
|
+
# Django stuff:
|
|
105
|
+
*.log
|
|
106
|
+
local_settings.py
|
|
107
|
+
db.sqlite3
|
|
108
|
+
db.sqlite3-journal
|
|
109
|
+
|
|
110
|
+
# Flask stuff:
|
|
111
|
+
instance/
|
|
112
|
+
.webassets-cache
|
|
113
|
+
|
|
114
|
+
# Scrapy stuff:
|
|
115
|
+
.scrapy
|
|
116
|
+
|
|
117
|
+
# Sphinx documentation
|
|
118
|
+
docs/_build/
|
|
119
|
+
|
|
120
|
+
# PyBuilder
|
|
121
|
+
.pybuilder/
|
|
122
|
+
target/
|
|
123
|
+
|
|
124
|
+
# Jupyter Notebook
|
|
125
|
+
.ipynb_checkpoints
|
|
126
|
+
|
|
127
|
+
# IPython
|
|
128
|
+
profile_default/
|
|
129
|
+
ipython_config.py
|
|
130
|
+
|
|
131
|
+
# pyenv
|
|
132
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
133
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
134
|
+
# .python-version
|
|
135
|
+
|
|
136
|
+
# pipenv
|
|
137
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
138
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
139
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
140
|
+
# install all needed dependencies.
|
|
141
|
+
# Pipfile.lock
|
|
142
|
+
|
|
143
|
+
# UV
|
|
144
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
145
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
146
|
+
# commonly ignored for libraries.
|
|
147
|
+
uv.lock
|
|
148
|
+
|
|
149
|
+
# poetry
|
|
150
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
151
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
152
|
+
# commonly ignored for libraries.
|
|
153
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
154
|
+
# poetry.lock
|
|
155
|
+
# poetry.toml
|
|
156
|
+
|
|
157
|
+
# pdm
|
|
158
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
159
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
160
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
161
|
+
# pdm.lock
|
|
162
|
+
# pdm.toml
|
|
163
|
+
.pdm-python
|
|
164
|
+
.pdm-build/
|
|
165
|
+
|
|
166
|
+
# pixi
|
|
167
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
168
|
+
# pixi.lock
|
|
169
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
170
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
171
|
+
.pixi
|
|
172
|
+
|
|
173
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
174
|
+
__pypackages__/
|
|
175
|
+
|
|
176
|
+
# Celery stuff
|
|
177
|
+
celerybeat-schedule
|
|
178
|
+
celerybeat.pid
|
|
179
|
+
|
|
180
|
+
# Redis
|
|
181
|
+
*.rdb
|
|
182
|
+
*.aof
|
|
183
|
+
*.pid
|
|
184
|
+
|
|
185
|
+
# RabbitMQ
|
|
186
|
+
mnesia/
|
|
187
|
+
rabbitmq/
|
|
188
|
+
rabbitmq-data/
|
|
189
|
+
|
|
190
|
+
# ActiveMQ
|
|
191
|
+
activemq-data/
|
|
192
|
+
|
|
193
|
+
# SageMath parsed files
|
|
194
|
+
*.sage.py
|
|
195
|
+
|
|
196
|
+
# Environments
|
|
197
|
+
.env
|
|
198
|
+
.envrc
|
|
199
|
+
.venv
|
|
200
|
+
env/
|
|
201
|
+
venv/
|
|
202
|
+
ENV/
|
|
203
|
+
env.bak/
|
|
204
|
+
venv.bak/
|
|
205
|
+
|
|
206
|
+
# Spyder project settings
|
|
207
|
+
.spyderproject
|
|
208
|
+
.spyproject
|
|
209
|
+
|
|
210
|
+
# Rope project settings
|
|
211
|
+
.ropeproject
|
|
212
|
+
|
|
213
|
+
# mkdocs documentation
|
|
214
|
+
/site
|
|
215
|
+
|
|
216
|
+
# mypy
|
|
217
|
+
.mypy_cache/
|
|
218
|
+
.dmypy.json
|
|
219
|
+
dmypy.json
|
|
220
|
+
|
|
221
|
+
# Pyre type checker
|
|
222
|
+
.pyre/
|
|
223
|
+
|
|
224
|
+
# pytype static type analyzer
|
|
225
|
+
.pytype/
|
|
226
|
+
|
|
227
|
+
# Cython debug symbols
|
|
228
|
+
cython_debug/
|
|
229
|
+
|
|
230
|
+
# PyCharm
|
|
231
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
232
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
233
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
234
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
235
|
+
# .idea/
|
|
236
|
+
|
|
237
|
+
# Abstra
|
|
238
|
+
# Abstra is an AI-powered process automation framework.
|
|
239
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
240
|
+
# Learn more at https://abstra.io/docs
|
|
241
|
+
.abstra/
|
|
242
|
+
|
|
243
|
+
# Visual Studio Code
|
|
244
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
245
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
246
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
247
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
248
|
+
# .vscode/
|
|
249
|
+
|
|
250
|
+
# Ruff stuff:
|
|
251
|
+
.ruff_cache/
|
|
252
|
+
|
|
253
|
+
# PyPI configuration file
|
|
254
|
+
.pypirc
|
|
255
|
+
|
|
256
|
+
# Marimo
|
|
257
|
+
marimo/_static/
|
|
258
|
+
marimo/_lsp/
|
|
259
|
+
__marimo__/
|
|
260
|
+
|
|
261
|
+
# Streamlit
|
|
262
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mikejmz24
|
|
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.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# ── Settings ─────────────────────────────────────────────────────────────────
|
|
2
|
+
|
|
3
|
+
PYTHON := python
|
|
4
|
+
PYTEST := uv run python -m pytest
|
|
5
|
+
TESTS := tests/
|
|
6
|
+
|
|
7
|
+
# Core formatter flags.
|
|
8
|
+
# -p no:terminal → silence the default reporter
|
|
9
|
+
# -p pytest_glaze → load our plugin (PYTHONPATH=. makes it importable)
|
|
10
|
+
FMT := -p no:terminal -p pytest_glaze
|
|
11
|
+
|
|
12
|
+
# Optional pass-through vars:
|
|
13
|
+
# make test SUITE=tests/test_entities.py → single suite
|
|
14
|
+
# make test CASE=test_return_statuses_dict → single test by name
|
|
15
|
+
# make test K="sprint and not slow" → keyword expression
|
|
16
|
+
# make test ARGS="--co -q" → arbitrary extra flags
|
|
17
|
+
SUITE ?=
|
|
18
|
+
CASE ?=
|
|
19
|
+
K ?=
|
|
20
|
+
ARGS ?=
|
|
21
|
+
|
|
22
|
+
# Build the target path: SUITE if given, otherwise the whole TESTS dir.
|
|
23
|
+
_PATH := $(if $(SUITE),$(SUITE),$(TESTS))
|
|
24
|
+
|
|
25
|
+
# Build the -k filter: prefer K, fall back to CASE.
|
|
26
|
+
_KFLAG := $(if $(K),-k "$(K)",$(if $(CASE),-k "$(CASE)",))
|
|
27
|
+
|
|
28
|
+
# ── Primary targets ───────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
.PHONY: test test-fast test-corpus test-raw help
|
|
31
|
+
|
|
32
|
+
## test Run suite with custom output.
|
|
33
|
+
## SUITE=, CASE=, K= for filtering. ARGS= for raw pytest flags.
|
|
34
|
+
## Examples:
|
|
35
|
+
## make test
|
|
36
|
+
## make test SUITE=tests/test_entities.py
|
|
37
|
+
## make test CASE=test_return_statuses_dict
|
|
38
|
+
## make test K="sprint and not slow"
|
|
39
|
+
test:
|
|
40
|
+
@PYTHONPATH=. $(PYTEST) $(FMT) $(_PATH) $(_KFLAG) $(ARGS)
|
|
41
|
+
|
|
42
|
+
## test-fast Stop on first failure (-x). Accepts same filters as `test`.
|
|
43
|
+
test-fast:
|
|
44
|
+
@PYTHONPATH=. $(PYTEST) $(FMT) -x $(_PATH) $(_KFLAG) $(ARGS)
|
|
45
|
+
|
|
46
|
+
## test-corpus Run the formatter's own validation corpus (tests/corpus/).
|
|
47
|
+
## These tests are designed to exercise every output type —
|
|
48
|
+
## intentional failures are expected and correct.
|
|
49
|
+
test-corpus:
|
|
50
|
+
@PYTHONPATH=. $(PYTEST) $(FMT) tests/corpus/ $(ARGS)
|
|
51
|
+
|
|
52
|
+
## test-unit Run unit tests only (test_parsers, test_colorizer, test_plugin).
|
|
53
|
+
## No intentional failures — clean pass/fail signal.
|
|
54
|
+
test-unit:
|
|
55
|
+
@PYTHONPATH=. $(PYTEST) $(FMT) tests/test_parsers.py tests/test_colorizer.py tests/test_plugin.py $(_KFLAG) $(ARGS)
|
|
56
|
+
|
|
57
|
+
## test-raw Raw default pytest output. Useful for debugging the formatter.
|
|
58
|
+
test-raw:
|
|
59
|
+
@$(PYTEST) $(_PATH) $(_KFLAG) $(ARGS)
|
|
60
|
+
|
|
61
|
+
## help List all targets.
|
|
62
|
+
help:
|
|
63
|
+
@grep -E '^##' Makefile | sed 's/^## / /'
|