pytest-copie
Overview
pytest-copie is a pytest plugin that comes with a copie fixture which is a wrapper on top the copier API for generating projects. It helps you verify that your template is working as expected and takes care of cleaning up after running the tests. :ledger:
It is an adaptation of the pytest-cookies plugin for copier templates.
It’s here to help templates designers to check that everything works as expected on the generated files including (but not limited to):
linting operations
testing operations
packaging operations
documentation operations
…
Installation
pytest-copie is available on PyPI and can be installed with pip:
pip install pytest-copie
Usage
The copie fixture will allow you to copy a template and run tests against it. It will also clean up the generated project after the tests have been run.
def test_template(copie):
res = copie.copy(extra_answers={"repo_name": "helloworld"})
assert res.exit_code == 0
assert res.exception is None
assert result.project_dir.is_dir()
Context and template location can be fully customized, see our documentation for more details.
Credits
This package was created with Copier and the @12rambau/pypackage 0.1.16 project template.
Metadata
Release files for pytest-copie 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_copie-0.3.1.tar.gz | 25.6 kB | Without provenance | Details for pytest_copie-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_copie-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for pytest_copie-0.3.1-py3-none-any.whl |
Total release size: 34.6 kB
Release files / pytest_copie-0.3.1.tar.gz
| Download URL | pytest_copie-0.3.1.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7120c87bbe7489cb1a6bfcef154135cdf48b61ed8e8fb9035c788a40209f344a
|
|
BLAKE2b-256 checksum How to use checksums |
c6203722677a1d5364b4dd913dd0380fa437694b481feb1a1beab8b4ced7c793
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / pytest_copie-0.3.1-py3-none-any.whl
| Download URL | pytest_copie-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6669f5ce3e1e15a7c62b09519b07075611e7e06ee5474e20424a6d7fa975194c
|
|
BLAKE2b-256 checksum How to use checksums |
257a5096d153d08a47392cad8bad8b43cfdd5eee21c3a7f3021cf70cd311814b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for pytest-copie 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.