{ "info": { "author": "Raphael Pierzina", "author_email": "raphael@hackebrot.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing" ], "description": "# pytest-cookies\n\n[pytest][pytest] is a mature testing framework for Python that is developed\nby a thriving and ever-growing community of volunteers. It uses plain assert\nstatements and regular Python comparisons. At the core of the pytest test\nframework is a powerful hook-based plugin system.\n\n**pytest-cookies** is a pytest plugin that comes with a ``cookies`` fixture\nwhich is a wrapper for the [cookiecutter][cookiecutter] API for generating\nprojects. It helps you verify that your template is working as expected and\ntakes care of cleaning up after running the tests. \ud83c\udf6a\n\n# Installation\n\n**pytest-cookies** is available for download from [PyPI][pypi] via [pip][pip]:\n\n```text\npip install pytest-cookies\n```\nThis will automatically install [pytest][pytest] and\n[cookiecutter][cookiecutter].\n\n# Usage\n\n## Generate a new project\n\nThe ``cookies.bake()`` method generates a new project from your template\nbased on the default values specified in ``cookiecutter.json``:\n\n```python\ndef test_bake_project(cookies):\n result = cookies.bake(extra_context={\"repo_name\": \"helloworld\"})\n\n assert result.exit_code == 0\n assert result.exception is None\n assert result.project.basename == \"helloworld\"\n assert result.project.isdir()\n```\n\nThe ``cookies.bake()`` method also accepts the ``extra_context`` keyword\nargument that will be passed to cookiecutter. The given dictionary will\noverride the default values of the template context, effectively allowing you\nto test arbitrary user input data.\n\nFor more information on injecting extra context, please check out the\n[cookiecutter documentation][extra-context].\n\n## Specify the template directory\n\nBy default ``cookies.bake()`` looks for a cookiecutter template in the\ncurrent directory. This can be overridden on the command line by passing a\n``--template`` parameter to pytest:\n\n```text\npytest --template TEMPLATE\n```\n\nYou can customize the cookiecutter template directory from a test by passing\nin the optional ``template`` paramter:\n\n```python\n@pytest.fixture\ndef custom_template(tmpdir):\n template = tmpdir.ensure(\"cookiecutter-template\", dir=True)\n template.join(\"cookiecutter.json\").write('{\"repo_name\": \"example-project\"}')\n\n repo_dir = template.ensure(\"{{cookiecutter.repo_name}}\", dir=True)\n repo_dir.join(\"README.rst\").write(\"{{cookiecutter.repo_name}}\")\n\n return template\n\n\ndef test_bake_custom_project(cookies, custom_template):\n \"\"\"Test for 'cookiecutter-template'.\"\"\"\n result = cookies.bake(template=str(custom_template))\n\n assert result.exit_code == 0\n assert result.exception is None\n assert result.project.basename == \"example-project\"\n assert result.project.isdir()\n```\n\n## Keep output directories for debugging\n\nBy default ``cookies`` removes baked projects.\n\nHowever, you can pass the ``keep-baked-projects`` flag if you'd like to keep\nthem ([it won't clutter][temporary-directories] as pytest only keeps the\nthree newest temporary directories):\n\n```text\npytest --keep-baked-projects\n```\n\n# Community\n\nContributions are very welcome! If you encounter any problems, please [file\nan issue][new-issue] along with a detailed description. Tests can be run with\n[tox][tox]. Please make sure all of the tests are green before you submit a\npull request.\n\nYou can also support the development of this project by volunteering to\nbecome a maintainer, which means you will be able to triage issues, merge\npull-requests, and publish new releases. If you're interested, please submit\na pull-request to add yourself to the list of [maintainers][community] and\nwe'll get you started! \ud83c\udf6a\n\nPlease note that **pytest-cookies** is released with a [Contributor Code of\nConduct][code-of-conduct]. By participating in this project you agree to\nabide by its terms.\n\n# License\n\nDistributed under the terms of the [MIT license][license], **pytest-cookies**\nis free and open source software.\n\n[cookiecutter]: https://github.com/audreyr/cookiecutter\n[pytest]: https://github.com/pytest-dev/pytest\n[pip]: https://pypi.org/project/pip/\n[pypi]: https://pypi.org/project/pytest-cookies/\n[extra-context]: https://cookiecutter.readthedocs.io/en/latest/advanced/injecting_context.html\n[temporary-directories]: https://docs.pytest.org/en/latest/tmpdir.html#the-default-base-temporary-directory\n[tox]: https://pypi.org/project/tox/\n[new-issue]: https://github.com/hackebrot/pytest-cookies/issues\n[code-of-conduct]: https://github.com/hackebrot/pytest-cookies/blob/master/CODE_OF_CONDUCT.md\n[community]: https://github.com/hackebrot/pytest-cookies/blob/master/COMMUNITY.md\n[license]: https://github.com/hackebrot/pytest-cookies/blob/master/LICENSE\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hackebrot/pytest-cookies", "keywords": "cookiecutter,pytest", "license": "MIT", "maintainer": "Raphael Pierzina", "maintainer_email": "raphael@hackebrot.de", "name": "pytest-cookies", "package_url": "https://pypi.org/project/pytest-cookies/", "platform": "", "project_url": "https://pypi.org/project/pytest-cookies/", "project_urls": { "Homepage": "https://github.com/hackebrot/pytest-cookies", "Issues": "https://github.com/hackebrot/pytest-cookies/issues", "Repository": "https://github.com/hackebrot/pytest-cookies" }, "release_url": "https://pypi.org/project/pytest-cookies/0.4.0/", "requires_dist": [ "arrow (<0.14.0)", "cookiecutter (<=1.6.0,>=1.4.0)", "pytest (<5.0.0,>=3.3.0)" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "The pytest plugin for your Cookiecutter templates \ud83c\udf6a", "version": "0.4.0" }, "last_serial": 5490179, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "78d6b20ff9b84a482f6271d1fe6c9c6c", "sha256": "d8b8d8a6aae54517983937b8c6bf557585a9ef5be4af063ef2bdfce522c17691" }, "downloads": -1, "filename": "pytest_cookies-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "78d6b20ff9b84a482f6271d1fe6c9c6c", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7293, "upload_time": "2015-10-22T22:37:47", "url": "https://files.pythonhosted.org/packages/b9/bd/cff2343bb99e3368a41a61250f1836dd6d86b821e0e8eceddfd8eede915f/pytest_cookies-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69addadc0c0dcfabe610aff399b63bc9", "sha256": "8c7779103286dfefafea1881f875a799682d1a15d1fa3cacf103dbc241b97d0a" }, "downloads": -1, "filename": "pytest-cookies-0.1.0.tar.gz", "has_sig": false, "md5_digest": "69addadc0c0dcfabe610aff399b63bc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4423, "upload_time": "2015-10-22T22:37:26", "url": "https://files.pythonhosted.org/packages/d4/44/5c0518e89133287bf5a162e76d8d92d1f68dfcbc62acd7989407a908d114/pytest-cookies-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2e998d4a0f5deb5a97515b675e32012a", "sha256": "55c7194568eb9f2676ed8f3074bfb75f5a3a7bc58bdb8366f3e1c80d1fce288f" }, "downloads": -1, "filename": "pytest_cookies-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e998d4a0f5deb5a97515b675e32012a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7693, "upload_time": "2016-03-28T18:34:37", "url": "https://files.pythonhosted.org/packages/a1/12/0494065874fa60e8640e468b6cef1a1a09cc4a4d8c670cb81701c45ca068/pytest_cookies-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f9f703cb83e25c0907a698e5d23d450", "sha256": "8822dcc1095edcd45a45db727fee647c7abbee111691380dd7e82c462c7b90f4" }, "downloads": -1, "filename": "pytest-cookies-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5f9f703cb83e25c0907a698e5d23d450", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4805, "upload_time": "2016-03-28T18:34:43", "url": "https://files.pythonhosted.org/packages/8c/08/ef11eb15d69399e491e9c41549605637d159d353afe957111017e23ffa17/pytest-cookies-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "95959e46d306a611937ecb9579440069", "sha256": "a6f37393b697eb3357625a5c226888d9dd020cca3d112b38c630467ce9ff7844" }, "downloads": -1, "filename": "pytest_cookies-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "95959e46d306a611937ecb9579440069", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8614, "upload_time": "2017-10-15T09:37:17", "url": "https://files.pythonhosted.org/packages/68/a2/0172b87baf2bd39b3794c9fd6b3ff1a74f482f826d0dcf69120f4d6a7f59/pytest_cookies-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5fba6c6248f15d02088a4bf18835d8c9", "sha256": "7054b5abd87704c3769b46deb65c332fadba80905d4103b0b1e0b4fe8a9a852a" }, "downloads": -1, "filename": "pytest-cookies-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5fba6c6248f15d02088a4bf18835d8c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6397, "upload_time": "2017-10-15T09:37:19", "url": "https://files.pythonhosted.org/packages/e6/05/5f548c4cf973e22c7196e0b49d491af687758404d7f9886717864ccafc32/pytest-cookies-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "405f05dfb12c409c6f704ff917cddf38", "sha256": "51a2485cffb11659199c16f640f7154157f7c9c0670fbe5d18d4cfcaedab5d55" }, "downloads": -1, "filename": "pytest_cookies-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "405f05dfb12c409c6f704ff917cddf38", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6083, "upload_time": "2019-07-05T08:15:44", "url": "https://files.pythonhosted.org/packages/0a/48/bd48e883f40e1defcae70ea69682de41a544e906cc4c913414692948bf01/pytest_cookies-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44d30dba21ab84e6dc91cffd829c3e55", "sha256": "82b0b7d4a7271dae9c1fb07a0fd44d8ccb3755267665d2d5669956e2af547a1e" }, "downloads": -1, "filename": "pytest-cookies-0.4.0.tar.gz", "has_sig": false, "md5_digest": "44d30dba21ab84e6dc91cffd829c3e55", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8347, "upload_time": "2019-07-05T08:15:45", "url": "https://files.pythonhosted.org/packages/66/64/c00ec8a138e3d43b32c80598915cbbaf293ebdcc6ba2d17806a53c06436a/pytest-cookies-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "405f05dfb12c409c6f704ff917cddf38", "sha256": "51a2485cffb11659199c16f640f7154157f7c9c0670fbe5d18d4cfcaedab5d55" }, "downloads": -1, "filename": "pytest_cookies-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "405f05dfb12c409c6f704ff917cddf38", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6083, "upload_time": "2019-07-05T08:15:44", "url": "https://files.pythonhosted.org/packages/0a/48/bd48e883f40e1defcae70ea69682de41a544e906cc4c913414692948bf01/pytest_cookies-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44d30dba21ab84e6dc91cffd829c3e55", "sha256": "82b0b7d4a7271dae9c1fb07a0fd44d8ccb3755267665d2d5669956e2af547a1e" }, "downloads": -1, "filename": "pytest-cookies-0.4.0.tar.gz", "has_sig": false, "md5_digest": "44d30dba21ab84e6dc91cffd829c3e55", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8347, "upload_time": "2019-07-05T08:15:45", "url": "https://files.pythonhosted.org/packages/66/64/c00ec8a138e3d43b32c80598915cbbaf293ebdcc6ba2d17806a53c06436a/pytest-cookies-0.4.0.tar.gz" } ] }