pytest-remaster 0.0.0b2__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,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [Pierre-Sassoulas]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: "pypi/pytest-remaster"
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: Pierre-Sassoulas
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,3 @@
1
+ # Coordinated Disclosure Plan
2
+
3
+ [Coordinated Disclosure Plan](https://tidelift.com/security)
@@ -0,0 +1,15 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "github-actions" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "monthly"
12
+ - package-ecosystem: "pip"
13
+ directory: "/"
14
+ schedule:
15
+ interval: "monthly"
@@ -0,0 +1,24 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request: ~
8
+
9
+ jobs:
10
+ tests:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev"]
15
+ steps:
16
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
17
+ - name: Python-${{ matrix.python-version }}
18
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: pip3 install -e ".[dev]"
23
+ - name: Test
24
+ run: pytest
@@ -0,0 +1,65 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - published
7
+
8
+ env:
9
+ DEFAULT_PYTHON: "3.13"
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ build:
16
+ name: Build release assets
17
+ runs-on: ubuntu-latest
18
+ if: github.event_name == 'release'
19
+ steps:
20
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
21
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
22
+ with:
23
+ python-version: ${{ env.DEFAULT_PYTHON }}
24
+ check-latest: true
25
+ - run: python -m pip install build
26
+ - run: python -m build
27
+ - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
28
+ with:
29
+ name: release-assets
30
+ path: dist/
31
+
32
+ release-pypi:
33
+ name: Upload release to PyPI
34
+ runs-on: ubuntu-latest
35
+ needs: ["build"]
36
+ environment:
37
+ name: PyPI
38
+ url: https://pypi.org/project/pytest-remaster/
39
+ permissions:
40
+ id-token: write
41
+ steps:
42
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
43
+ with:
44
+ name: release-assets
45
+ path: dist/
46
+ - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
47
+
48
+ release-github:
49
+ name: Upload assets to Github release
50
+ runs-on: ubuntu-latest
51
+ needs: ["build"]
52
+ permissions:
53
+ contents: write
54
+ id-token: write
55
+ steps:
56
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
57
+ with:
58
+ name: release-assets
59
+ path: dist/
60
+ - uses: sigstore/gh-action-sigstore-python@a5caf349bc536fbef3668a10ed7f5cd309a4b53d # v3.2.0
61
+ if: github.event_name == 'release'
62
+ with:
63
+ inputs: |
64
+ ./dist/*.tar.gz
65
+ ./dist/*.whl
@@ -0,0 +1,4 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.egg-info/
4
+ dist/
@@ -0,0 +1,21 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-toml
9
+ - id: check-merge-conflict
10
+ - id: debug-statements
11
+ - repo: https://github.com/astral-sh/ruff-pre-commit
12
+ rev: v0.15.7
13
+ hooks:
14
+ - id: ruff
15
+ args: [--fix]
16
+ - id: ruff-format
17
+ - repo: https://github.com/pre-commit/mirrors-mypy
18
+ rev: v1.19.1
19
+ hooks:
20
+ - id: mypy
21
+ additional_dependencies: [pytest>=7.0]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pierre Sassoulas
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,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytest-remaster
3
+ Version: 0.0.0b2
4
+ Summary: Golden master testing for pytest with automatic regeneration.
5
+ Author: Pierre Sassoulas
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Pierre-Sassoulas/pytest-remaster
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Framework :: Pytest
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pytest>=7.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: pre-commit; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ [![PyPI version](https://badge.fury.io/py/pytest-remaster.svg)](https://badge.fury.io/py/pytest-remaster)
27
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-remaster)](https://pypi.org/project/pytest-remaster/)
28
+ [![PyPI - License](https://img.shields.io/pypi/l/pytest-remaster)](https://pypi.org/project/pytest-remaster/)
29
+
30
+ # pytest-remaster
31
+
32
+ Framework for golden master testing for pytest with automatic regeneration of the golden master.
33
+
34
+ ## Usage
35
+
36
+ By default, golden master files are automatically regenerated when a comparison fails.
37
+ Use `--no-remaster` to get strict failures instead.
38
+
39
+ The default can be changed in `pyproject.toml`:
40
+
41
+ ```toml
42
+ [tool.pytest.ini_options]
43
+ remaster-by-default = false
44
+ ```
@@ -0,0 +1,19 @@
1
+ [![PyPI version](https://badge.fury.io/py/pytest-remaster.svg)](https://badge.fury.io/py/pytest-remaster)
2
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-remaster)](https://pypi.org/project/pytest-remaster/)
3
+ [![PyPI - License](https://img.shields.io/pypi/l/pytest-remaster)](https://pypi.org/project/pytest-remaster/)
4
+
5
+ # pytest-remaster
6
+
7
+ Framework for golden master testing for pytest with automatic regeneration of the golden master.
8
+
9
+ ## Usage
10
+
11
+ By default, golden master files are automatically regenerated when a comparison fails.
12
+ Use `--no-remaster` to get strict failures instead.
13
+
14
+ The default can be changed in `pyproject.toml`:
15
+
16
+ ```toml
17
+ [tool.pytest.ini_options]
18
+ remaster-by-default = false
19
+ ```
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77.0", "setuptools-scm>=8.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pytest-remaster"
7
+ dynamic = ["version"]
8
+ description = "Golden master testing for pytest with automatic regeneration."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [{ name = "Pierre Sassoulas" }]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Framework :: Pytest",
16
+ "Intended Audience :: Developers",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.9",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Software Development :: Testing",
24
+ ]
25
+ dependencies = ["pytest>=7.0"]
26
+
27
+ [project.optional-dependencies]
28
+ dev = ["pre-commit"]
29
+
30
+ [project.entry-points.pytest11]
31
+ remaster = "pytest_remaster.plugin"
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/Pierre-Sassoulas/pytest-remaster"
35
+
36
+ [tool.setuptools_scm]
37
+
38
+ [tool.pytest.ini_options]
39
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ """Golden master testing for pytest with automatic regeneration."""
@@ -0,0 +1,37 @@
1
+ """Pytest plugin for golden master testing with automatic regeneration."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import pytest
6
+
7
+
8
+ def pytest_addoption(parser: pytest.Parser) -> None:
9
+ group = parser.getgroup("remaster", "Golden master testing")
10
+ group.addoption(
11
+ "--remaster",
12
+ action="store_true",
13
+ dest="remaster",
14
+ default=None,
15
+ help="Regenerate golden master files when comparison fails.",
16
+ )
17
+ group.addoption(
18
+ "--no-remaster",
19
+ action="store_false",
20
+ dest="remaster",
21
+ help="Compare against golden master files without regenerating.",
22
+ )
23
+ parser.addini(
24
+ "remaster-by-default",
25
+ type="bool",
26
+ default=True,
27
+ help="Whether to regenerate golden master files by default (default: True).",
28
+ )
29
+
30
+
31
+ @pytest.fixture
32
+ def remaster(request: pytest.FixtureRequest) -> bool:
33
+ """Whether tests should regenerate golden master files."""
34
+ cli = request.config.getoption("remaster")
35
+ if cli is not None:
36
+ return cli
37
+ return request.config.getini("remaster-by-default")
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: pytest-remaster
3
+ Version: 0.0.0b2
4
+ Summary: Golden master testing for pytest with automatic regeneration.
5
+ Author: Pierre Sassoulas
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Pierre-Sassoulas/pytest-remaster
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Framework :: Pytest
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pytest>=7.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: pre-commit; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ [![PyPI version](https://badge.fury.io/py/pytest-remaster.svg)](https://badge.fury.io/py/pytest-remaster)
27
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-remaster)](https://pypi.org/project/pytest-remaster/)
28
+ [![PyPI - License](https://img.shields.io/pypi/l/pytest-remaster)](https://pypi.org/project/pytest-remaster/)
29
+
30
+ # pytest-remaster
31
+
32
+ Framework for golden master testing for pytest with automatic regeneration of the golden master.
33
+
34
+ ## Usage
35
+
36
+ By default, golden master files are automatically regenerated when a comparison fails.
37
+ Use `--no-remaster` to get strict failures instead.
38
+
39
+ The default can be changed in `pyproject.toml`:
40
+
41
+ ```toml
42
+ [tool.pytest.ini_options]
43
+ remaster-by-default = false
44
+ ```
@@ -0,0 +1,20 @@
1
+ .gitignore
2
+ .pre-commit-config.yaml
3
+ LICENSE
4
+ README.md
5
+ pyproject.toml
6
+ .github/FUNDING.yml
7
+ .github/SECURITY.md
8
+ .github/dependabot.yml
9
+ .github/workflows/ci.yaml
10
+ .github/workflows/release.yaml
11
+ src/pytest_remaster/__init__.py
12
+ src/pytest_remaster/plugin.py
13
+ src/pytest_remaster.egg-info/PKG-INFO
14
+ src/pytest_remaster.egg-info/SOURCES.txt
15
+ src/pytest_remaster.egg-info/dependency_links.txt
16
+ src/pytest_remaster.egg-info/entry_points.txt
17
+ src/pytest_remaster.egg-info/requires.txt
18
+ src/pytest_remaster.egg-info/top_level.txt
19
+ tests/__init__.py
20
+ tests/test_plugin.py
@@ -0,0 +1,2 @@
1
+ [pytest11]
2
+ remaster = pytest_remaster.plugin
@@ -0,0 +1,4 @@
1
+ pytest>=7.0
2
+
3
+ [dev]
4
+ pre-commit
@@ -0,0 +1 @@
1
+ pytest_remaster
File without changes
@@ -0,0 +1,8 @@
1
+ """Basic tests for the pytest-remaster plugin."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ def test_remaster_option(pytestconfig):
7
+ """The --remaster option is registered and defaults to False."""
8
+ assert pytestconfig.getoption("--remaster") is False