{ "info": { "author": "Gabriel Reis", "author_email": "gabrielcnr@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing" ], "description": "# pytest-datadir\n\npytest plugin for manipulating test data directories and files.\n\n[![Build Status](https://travis-ci.org/gabrielcnr/pytest-datadir.svg?branch=master)](https://travis-ci.org/gabrielcnr/pytest-datadir)\n[![PyPI](https://img.shields.io/pypi/v/pytest-datadir.svg)](https://pypi.python.org/pypi/pytest-datadir)\n[![PythonVersions](https://img.shields.io/pypi/pyversions/pytest-datadir.svg)](https://pypi.python.org/pypi/pytest-datadir)\n[![CondaForge](https://img.shields.io/conda/vn/conda-forge/pytest-datadir.svg)](https://anaconda.org/conda-forge/pytest-datadir)\n\n\n# Usage\npytest-datadir will look up for a directory with the name of your module or the global 'data' folder.\nLet's say you have a structure like this:\n\n```\n.\n\u251c\u2500\u2500 data/\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 hello.txt\n\u251c\u2500\u2500 test_hello/\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 spam.txt\n\u2514\u2500\u2500 test_hello.py\n```\nYou can access the contents of these files using injected variables `datadir` (for *test_* folder) or `shared_datadir`\n(for *data* folder):\n\n```python\ndef test_read_global(shared_datadir):\n contents = (shared_datadir / 'hello.txt').read_text()\n assert contents == 'Hello World!\\n'\n\ndef test_read_module(datadir):\n contents = (datadir / 'spam.txt').read_text()\n assert contents == 'eggs\\n'\n```\n\npytest-datadir will copy the original file to a temporary folder, so changing the file contents won't change the original data file.\n\nBoth `datadir` and `shared_datadir` fixtures are `pathlib.Path` objects.\n\n# Releases\n\nFollow these steps to make a new release:\n\n1. Create a new branch `release-X.Y.Z` from `master`.\n2. Update `CHANGELOG.rst`.\n3. Open a PR.\n4. After it is **green** and **approved**, push a new tag in the format `X.Y.Z`.\n\nTravis will deploy to PyPI automatically.\n\nAfterwards, update the recipe in [conda-forge/pytest-datadir-feedstock](https://github.com/conda-forge/pytest-datadir-feedstock).\n\n# License\n\nMIT.\n\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": "http://github.com/gabrielcnr/pytest-datadir", "keywords": "pytest test unittest directory file", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-datadir", "package_url": "https://pypi.org/project/pytest-datadir/", "platform": "", "project_url": "https://pypi.org/project/pytest-datadir/", "project_urls": { "Homepage": "http://github.com/gabrielcnr/pytest-datadir" }, "release_url": "https://pypi.org/project/pytest-datadir/1.3.1/", "requires_dist": [ "pytest (>=2.7.0)", "pathlib2 ; python_version<\"3.4\"" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "pytest plugin for test data directories and files", "version": "1.3.1", "yanked": false, "yanked_reason": null }, "last_serial": 6012626, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0bbf3b76a4a6d56fa633165097e41f74", "sha256": "898020f9865c56844399f28475e0c7ef8c7ca58614929fd07cbb30ee2d8e2657" }, "downloads": -1, "filename": "pytest-datadir-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0bbf3b76a4a6d56fa633165097e41f74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1633, "upload_time": "2015-07-02T21:57:39", "upload_time_iso_8601": "2015-07-02T21:57:39.523242Z", "url": "https://files.pythonhosted.org/packages/ab/c3/d0c51a27d0d91cced11507acb82678d9243787e9def4bcd0086df00aa34e/pytest-datadir-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f1636bf751d2405a5d1a23da843d2d4a", "sha256": "9ebbf4605b38c049e0ab8a0a90028488ed4d98d4efa1810e62dd99daa3ab96e5" }, "downloads": -1, "filename": "pytest_datadir-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f1636bf751d2405a5d1a23da843d2d4a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3456, "upload_time": "2016-10-17T16:49:35", "upload_time_iso_8601": "2016-10-17T16:49:35.518230Z", "url": "https://files.pythonhosted.org/packages/51/36/d9799cbc15a994a8244b27beef1d22ff9445ea11a214f865586483a954e7/pytest_datadir-0.2.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "4b845414c037494dd80d541007e2fe9f", "sha256": "609d9da4f330e615e97918a03909b2905f92e01f5294708d8fd7ff2b47267e9e" }, "downloads": -1, "filename": "pytest-datadir-0.2.0.zip", "has_sig": false, "md5_digest": "4b845414c037494dd80d541007e2fe9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4025, "upload_time": "2016-10-17T16:49:38", "upload_time_iso_8601": "2016-10-17T16:49:38.546057Z", "url": "https://files.pythonhosted.org/packages/f3/fc/a883ee5440edf6a83e19dce338a9f1253035cdc3cb5c7bd9090b468f378e/pytest-datadir-0.2.0.zip", "yanked": false, "yanked_reason": null } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "8a9678eed438187835ab4e18247f8436", "sha256": "7772c35acc155b26bc518d5ba36918113b83fbb6d39c34eda4ba6cc988df0275" }, "downloads": -1, "filename": "pytest-datadir-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8a9678eed438187835ab4e18247f8436", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1559, "upload_time": "2017-08-09T00:05:04", "upload_time_iso_8601": "2017-08-09T00:05:04.141598Z", "url": "https://files.pythonhosted.org/packages/4f/81/daf72dd344f98ac9e3e0ef8cf52b7c9e4f5f268075bd5a2eaeb86e2a911d/pytest-datadir-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2b7dbd0203cef90519b8d1ffbd5f02b6", "sha256": "68226fbb6780366950a9409bb705cd4d05b11bff07a4569d4cc589c69c259def" }, "downloads": -1, "filename": "pytest_datadir-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2b7dbd0203cef90519b8d1ffbd5f02b6", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 3279, "upload_time": "2017-09-09T17:25:37", "upload_time_iso_8601": "2017-09-09T17:25:37.132166Z", "url": "https://files.pythonhosted.org/packages/a8/d0/ba05b1447b5ab756786444b8ef6dd6adb80a1d5c1f5c256b30808377a980/pytest_datadir-1.0.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "ec0da45731cea3161be014e29672685d", "sha256": "3e5d1892c68d0dfb6863e87d6a1f683e67be60802fee798a3ccae5dbda1ab378" }, "downloads": -1, "filename": "pytest-datadir-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ec0da45731cea3161be014e29672685d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1606, "upload_time": "2017-09-09T19:45:22", "upload_time_iso_8601": "2017-09-09T19:45:22.685301Z", "url": "https://files.pythonhosted.org/packages/17/8e/a5ec251d7e4e2b68f9f8ea79d556383d72b42fa9ca0a373777dec9e5b570/pytest-datadir-1.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "d7b54de81dcdad90f4b352adfd94fb44", "sha256": "96f4558d116fda3fc9fbc0e522141a8379d3f239e3872338682f205a727d739d" }, "downloads": -1, "filename": "pytest_datadir-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d7b54de81dcdad90f4b352adfd94fb44", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3990, "upload_time": "2018-07-10T18:49:00", "upload_time_iso_8601": "2018-07-10T18:49:00.854831Z", "url": "https://files.pythonhosted.org/packages/fd/70/be458adf729c56da20d9005e2f77eeb16bbb61d3d0d620b509f9164a4d4a/pytest_datadir-1.1.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "5ba8a18696875bd40f29e2ff06debd36", "sha256": "450e60d0c70209659d342d7de0bf0987af7a15e705339f0109de41f5bd50d080" }, "downloads": -1, "filename": "pytest-datadir-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5ba8a18696875bd40f29e2ff06debd36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6522, "upload_time": "2018-07-10T18:49:02", "upload_time_iso_8601": "2018-07-10T18:49:02.058781Z", "url": "https://files.pythonhosted.org/packages/94/ec/78804a5fd731579313ac96fee871f802e2b8df790a2b2c45b97059c23936/pytest-datadir-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "174fa14713689f59b9ab1635322c0b5f", "sha256": "95ace0da83531b3757b1ee57674299154b41905d9f528ab79032b2062923908b" }, "downloads": -1, "filename": "pytest_datadir-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "174fa14713689f59b9ab1635322c0b5f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4026, "upload_time": "2018-07-11T13:47:34", "upload_time_iso_8601": "2018-07-11T13:47:34.327429Z", "url": "https://files.pythonhosted.org/packages/80/c1/300fb4f41d94f1944d2ed1b5653ee3e63f4686e4fe71d55437ed5cf8402b/pytest_datadir-1.2.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "825694b90c0ff0f918a8a9048fe5ada4", "sha256": "aca3b8c6a825acae3c3f60cfc2ed3c57c37505040e1c2ac73d215f10bae74e61" }, "downloads": -1, "filename": "pytest-datadir-1.2.0.tar.gz", "has_sig": false, "md5_digest": "825694b90c0ff0f918a8a9048fe5ada4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6764, "upload_time": "2018-07-11T13:47:35", "upload_time_iso_8601": "2018-07-11T13:47:35.264040Z", "url": "https://files.pythonhosted.org/packages/9c/87/a2c9f031b6a897064f48ab51d83bd52487130e9b5aed2f1b46d1eb220314/pytest-datadir-1.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "7d6e3d65497bc1115fb6173ca77a6164", "sha256": "dafc8deaabcd8bd1daa7f850c8e53ed16edbfac28770f5844f774ea357d562bf" }, "downloads": -1, "filename": "pytest_datadir-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7d6e3d65497bc1115fb6173ca77a6164", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4372, "upload_time": "2018-07-12T14:26:20", "upload_time_iso_8601": "2018-07-12T14:26:20.036124Z", "url": "https://files.pythonhosted.org/packages/86/c6/f04b2f15597327ca07170e67a054f8c55df1737e0730f7432b8f5e6a49bf/pytest_datadir-1.2.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "93ba7ac0ea6717e28935b6fe63f0b1a7", "sha256": "392a99e6c19b7937e916d756c3dc958f193b81b561e019e641b7a1f4be0320b9" }, "downloads": -1, "filename": "pytest-datadir-1.2.1.tar.gz", "has_sig": false, "md5_digest": "93ba7ac0ea6717e28935b6fe63f0b1a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6947, "upload_time": "2018-07-12T14:26:20", "upload_time_iso_8601": "2018-07-12T14:26:20.790098Z", "url": "https://files.pythonhosted.org/packages/2f/40/2e5518ef5675654f6750158b6b33071663073be3581fbb96e43b2eb1d682/pytest-datadir-1.2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "53e79000415e23d209a992d1aa9dd208", "sha256": "870511dd6bbfa1aa3b32a2e76bdd7fdb0239fac377b02c694338c6c184dd8c20" }, "downloads": -1, "filename": "pytest_datadir-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "53e79000415e23d209a992d1aa9dd208", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5852, "upload_time": "2019-01-15T11:26:08", "upload_time_iso_8601": "2019-01-15T11:26:08.131703Z", "url": "https://files.pythonhosted.org/packages/85/b8/72b4d1c3d2ef7e3c2de2156efa9826503b46d89da67a88ef727aade91a27/pytest_datadir-1.3.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "ed96b9e5ffca7b4923373388ae330c98", "sha256": "275f641dbb045896c7d185cfbe79afd15270eed09d334c2ceb17396e634e22dd" }, "downloads": -1, "filename": "pytest-datadir-1.3.0.tar.gz", "has_sig": false, "md5_digest": "ed96b9e5ffca7b4923373388ae330c98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16257, "upload_time": "2019-01-15T11:26:09", "upload_time_iso_8601": "2019-01-15T11:26:09.411027Z", "url": "https://files.pythonhosted.org/packages/39/35/89eb23f239fceab66b38b9c42ac1ab5f0cedb75aacb6ef4e3ebd1160687a/pytest-datadir-1.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "8bb997601b663596dab15cb61f3c502c", "sha256": "1847ed0efe0bc54cac40ab3fba6d651c2f03d18dd01f2a582979604d32e7621e" }, "downloads": -1, "filename": "pytest_datadir-1.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8bb997601b663596dab15cb61f3c502c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5879, "upload_time": "2019-10-22T13:04:22", "upload_time_iso_8601": "2019-10-22T13:04:22.511432Z", "url": "https://files.pythonhosted.org/packages/3c/9f/8f4c540b8d7c78f88dcd560523cf0519196a0b15129bce5a1772b14dc9c4/pytest_datadir-1.3.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b63756178be5133515f48f7586dacb9b", "sha256": "d3af1e738df87515ee509d6135780f25a15959766d9c2b2dbe02bf4fb979cb18" }, "downloads": -1, "filename": "pytest-datadir-1.3.1.tar.gz", "has_sig": false, "md5_digest": "b63756178be5133515f48f7586dacb9b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15230, "upload_time": "2019-10-22T13:04:23", "upload_time_iso_8601": "2019-10-22T13:04:23.760774Z", "url": "https://files.pythonhosted.org/packages/f2/a0/cf0d9240a9905688c4d4269f66c17a160fc0fcfec13963e65949c3109fc0/pytest-datadir-1.3.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8bb997601b663596dab15cb61f3c502c", "sha256": "1847ed0efe0bc54cac40ab3fba6d651c2f03d18dd01f2a582979604d32e7621e" }, "downloads": -1, "filename": "pytest_datadir-1.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8bb997601b663596dab15cb61f3c502c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5879, "upload_time": "2019-10-22T13:04:22", "upload_time_iso_8601": "2019-10-22T13:04:22.511432Z", "url": "https://files.pythonhosted.org/packages/3c/9f/8f4c540b8d7c78f88dcd560523cf0519196a0b15129bce5a1772b14dc9c4/pytest_datadir-1.3.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b63756178be5133515f48f7586dacb9b", "sha256": "d3af1e738df87515ee509d6135780f25a15959766d9c2b2dbe02bf4fb979cb18" }, "downloads": -1, "filename": "pytest-datadir-1.3.1.tar.gz", "has_sig": false, "md5_digest": "b63756178be5133515f48f7586dacb9b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15230, "upload_time": "2019-10-22T13:04:23", "upload_time_iso_8601": "2019-10-22T13:04:23.760774Z", "url": "https://files.pythonhosted.org/packages/f2/a0/cf0d9240a9905688c4d4269f66c17a160fc0fcfec13963e65949c3109fc0/pytest-datadir-1.3.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }