Name | pytest-copie JSON |
Version |
0.1.6
JSON |
| download |
home_page | |
Summary | The pytest plugin for your copier templates 📒 |
upload_time | 2024-01-27 15:09:10 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT |
keywords |
python
copier
pytest
pytest-plugin
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
pytest-copie
============
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg?logo=opensourceinitiative&logoColor=white
:target: LICENSE
:alt: License: MIT
.. image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?logo=git&logoColor=white
:target: https://conventionalcommits.org
:alt: conventional commit
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Black badge
.. image:: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier&logoColor=white
:target: https://github.com/prettier/prettier
:alt: prettier badge
.. image:: https://img.shields.io/badge/pre--commit-active-yellow?logo=pre-commit&logoColor=white
:target: https://pre-commit.com/
:alt: pre-commit
.. image:: https://img.shields.io/pypi/v/pytest-copie?color=blue&logo=pypi&logoColor=white
:target: https://pypi.org/project/pytest-copie/
:alt: PyPI version
.. image:: https://img.shields.io/conda/v/conda-forge/pytest-copie?logo=condaforge&logoColor=white&color=blue
:target: https://anaconda.org/conda-forge/pytest-copie
:alt: Conda
.. image:: https://img.shields.io/github/actions/workflow/status/12rambau/pytest-copie/unit.yaml?logo=github&logoColor=white
:target: https://github.com/12rambau/pytest-copie/actions/workflows/unit.yaml
:alt: build
.. image:: https://img.shields.io/codecov/c/github/12rambau/pytest-copie?logo=codecov&logoColor=white
:target: https://codecov.io/gh/12rambau/pytest-copie
:alt: Test Coverage
.. image:: https://img.shields.io/readthedocs/pytest-copie?logo=readthedocs&logoColor=white
:target: https://pytest-copie.readthedocs.io/en/latest/
:alt: Documentation Status
Overview
--------
pytest-copie is a `pytest <https://github.com/pytest-dev/pytest>`__ plugin that comes with a ``copie`` fixture which is a wrapper on top the `copier <https://github.com/copier-org/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 <https://github.com/hackebrot/pytest-cookies>`__ plugin for `copier <https://github.com/copier-org/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 <https://pypi.org/project/pytest-copie/>`__ and can be installed with `pip <https://pip.pypa.io/en/stable/>`__:
.. code-block:: console
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.
.. code-block:: python
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 <https://pytest-copie.readthedocs.io>`__ for more details.
Raw data
{
"_id": null,
"home_page": "",
"name": "pytest-copie",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "Python,copier,pytest,pytest-plugin",
"author": "",
"author_email": "Pierrick Rambaud <pierrick.rambaud49@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/99/b8/af81cb21156d00f2664fe77e91361639be162d12c5d519dca324375f584d/pytest_copie-0.1.6.tar.gz",
"platform": null,
"description": "\npytest-copie\n============\n\n.. image:: https://img.shields.io/badge/License-MIT-yellow.svg?logo=opensourceinitiative&logoColor=white\n :target: LICENSE\n :alt: License: MIT\n\n.. image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?logo=git&logoColor=white\n :target: https://conventionalcommits.org\n :alt: conventional commit\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Black badge\n\n.. image:: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier&logoColor=white\n :target: https://github.com/prettier/prettier\n :alt: prettier badge\n\n.. image:: https://img.shields.io/badge/pre--commit-active-yellow?logo=pre-commit&logoColor=white\n :target: https://pre-commit.com/\n :alt: pre-commit\n\n.. image:: https://img.shields.io/pypi/v/pytest-copie?color=blue&logo=pypi&logoColor=white\n :target: https://pypi.org/project/pytest-copie/\n :alt: PyPI version\n\n.. image:: https://img.shields.io/conda/v/conda-forge/pytest-copie?logo=condaforge&logoColor=white&color=blue\n :target: https://anaconda.org/conda-forge/pytest-copie\n :alt: Conda\n\n.. image:: https://img.shields.io/github/actions/workflow/status/12rambau/pytest-copie/unit.yaml?logo=github&logoColor=white\n :target: https://github.com/12rambau/pytest-copie/actions/workflows/unit.yaml\n :alt: build\n\n.. image:: https://img.shields.io/codecov/c/github/12rambau/pytest-copie?logo=codecov&logoColor=white\n :target: https://codecov.io/gh/12rambau/pytest-copie\n :alt: Test Coverage\n\n.. image:: https://img.shields.io/readthedocs/pytest-copie?logo=readthedocs&logoColor=white\n :target: https://pytest-copie.readthedocs.io/en/latest/\n :alt: Documentation Status\n\nOverview\n--------\n\npytest-copie is a `pytest <https://github.com/pytest-dev/pytest>`__ plugin that comes with a ``copie`` fixture which is a wrapper on top the `copier <https://github.com/copier-org/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:\n\nIt is an adaptation of the `pytest-cookies <https://github.com/hackebrot/pytest-cookies>`__ plugin for `copier <https://github.com/copier-org/copier>`__ templates.\n\nIt\u2019s here to help templates designers to check that everything works as expected on the generated files including (but not limited to):\n\n- linting operations\n- testing operations\n- packaging operations\n- documentation operations\n- \u2026\n\nInstallation\n------------\n\n**pytest-copie** is available on `PyPI <https://pypi.org/project/pytest-copie/>`__ and can be installed with `pip <https://pip.pypa.io/en/stable/>`__:\n\n.. code-block:: console\n\n pip install pytest-copie\n\nUsage\n-----\n\nThe ``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.\n\n.. code-block:: python\n\n def test_template(copie):\n res = copie.copy(extra_answers={\"repo_name\": \"helloworld\"})\n\n assert res.exit_code == 0\n assert res.exception is None\n assert result.project_dir.is_dir()\n\nContext and template location can be fully customized, see our `documentation <https://pytest-copie.readthedocs.io>`__ for more details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The pytest plugin for your copier templates \ud83d\udcd2",
"version": "0.1.6",
"project_urls": {
"Homepage": "https://github.com/12rambau/pytest-copie"
},
"split_keywords": [
"python",
"copier",
"pytest",
"pytest-plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "84b23cd5ae636af305415f7d3f672a1bf6452a691a5830707c5addf3b5483854",
"md5": "3a07c181cc7b04b7628cdc21cbd790bd",
"sha256": "f2c8044f902d69bc40e97c509590e0637fe057ffd7f830ac53c6408b640e71e3"
},
"downloads": -1,
"filename": "pytest_copie-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a07c181cc7b04b7628cdc21cbd790bd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6995,
"upload_time": "2024-01-27T15:09:09",
"upload_time_iso_8601": "2024-01-27T15:09:09.337287Z",
"url": "https://files.pythonhosted.org/packages/84/b2/3cd5ae636af305415f7d3f672a1bf6452a691a5830707c5addf3b5483854/pytest_copie-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "99b8af81cb21156d00f2664fe77e91361639be162d12c5d519dca324375f584d",
"md5": "d45c7bcd244eaf56562108c0ae473258",
"sha256": "4a95bb7d4ded6183bf9b1da8cce5b79ad3b4db1b1a8909d2ea6d87e491c76749"
},
"downloads": -1,
"filename": "pytest_copie-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "d45c7bcd244eaf56562108c0ae473258",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20301,
"upload_time": "2024-01-27T15:09:10",
"upload_time_iso_8601": "2024-01-27T15:09:10.890852Z",
"url": "https://files.pythonhosted.org/packages/99/b8/af81cb21156d00f2664fe77e91361639be162d12c5d519dca324375f584d/pytest_copie-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-27 15:09:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "12rambau",
"github_project": "pytest-copie",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pytest-copie"
}