{ "info": { "author": "Max Zheng", "author_email": "maxzheng.os@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Testing :: Unit" ], "description": "pytest-fixtures\n===============\n\nCommon fixtures for pytest\n\nTo use, just install it and pytest will automatically detect and load all fixtures::\n\n pip install pytest-fixtures\n\nTo install automatically, add it to your test requirements in `tox.ini` or `setup.py`.\n\nNo Dependencies\n---------------\n\nThis package does not depend on any other packages and never will. It uses standard libraries or uses run-time\nimports and therefore it is lightweight to add to any project. As for which external run-time dependency a fixture\nneeds, that is documented here and shouldn't matter as you would only use the fixtures that your project already has\ndependencies on.\n\nStandard Fixtures\n-----------------\n\nFixtures based on standard Python libraries\n\n\ntest_data\n~~~~~~~~~\n\nTo get path, read, and write test data in `tests/data` folder, use the `test_data` fixture.\n\nFirst, setup the path to test data path in `tests/conftest.py`:\n\n.. code-block:: python\n\n from pathlib import Path\n from fixtures import TestData\n\n TestData.BASE_PATH = Path(__file__).parent / 'data'\n\nAnd then get path to data files in `tests/data` using `test_data` fixture:\n\n.. code-block:: python\n\n def test_integration(test_data):\n obj = MyClass(test_data.path('sample.csv'))\n\nTo write out test data:\n\n.. code-block:: python\n\n def test_integration(test_data):\n output = run_cli()\n test_data.write('test_integration.output', output)\n\nThen read the test data to assert:\n\n.. code-block:: python\n\n def test_integration(test_data):\n output = run_cli()\n expected_output = test_data.read('test_integration.output')\n assert expected_output == output\n\nClick Fixtures\n--------------\n\nFixtures for Click \n\ncli_runner\n~~~~~~~~~~\n\nTo invoke, assert exit, with stdout/stderr outputs on error::\n\n.. code-block:: python\n\n def test_cli(cli_runner):\n result = cli_runner.invoke( ... ) # Prints out stdout/stderr from result with headings\n result = cli_runner.invoke_and_assert_exit(0, ... ) # Same as above and asserts exit code == 0\n\nLinks & Contact Info\n====================\n\n| PyPI Package: https://pypi.python.org/pypi/pytest-fixtures\n| GitHub Source: https://github.com/maxzheng/pytest-fixtures\n| Report Issues/Bugs: https://github.com/maxzheng/pytest-fixtures/issues\n|\n| Follow: https://twitter.com/MaxZhengX\n| Connect: https://www.linkedin.com/in/maxzheng\n| Contact: maxzheng.os @t gmail.com\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/maxzheng/pytest-fixtures", "keywords": "common pytest fixtures", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-fixtures", "package_url": "https://pypi.org/project/pytest-fixtures/", "platform": "", "project_url": "https://pypi.org/project/pytest-fixtures/", "project_urls": { "Homepage": "https://github.com/maxzheng/pytest-fixtures" }, "release_url": "https://pypi.org/project/pytest-fixtures/0.1.0/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Common fixtures for pytest", "version": "0.1.0" }, "last_serial": 5214383, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "1c6d4699379e4888a7fc3c64f2ed8183", "sha256": "d971483ce5fbad7a2edd590f87bb242ea9e9a6253c984612015b40411efaa1ec" }, "downloads": -1, "filename": "pytest-fixtures-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1c6d4699379e4888a7fc3c64f2ed8183", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4434, "upload_time": "2018-05-16T05:44:44", "url": "https://files.pythonhosted.org/packages/d8/f4/144e5661b55644048542ea465402875631ae18fa46bc136140f107f13955/pytest-fixtures-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "fc40f24fab1028ce0662a161344c0f5a", "sha256": "1b6650576e4fc03f191c305c55d04b541f2a96d36e50494f2ab1d9e6916f67fb" }, "downloads": -1, "filename": "pytest-fixtures-0.0.3.tar.gz", "has_sig": false, "md5_digest": "fc40f24fab1028ce0662a161344c0f5a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4797, "upload_time": "2018-05-16T05:51:48", "url": "https://files.pythonhosted.org/packages/6f/e6/7dbdafba33c6ff147988bb02e6d6a06f1eefef201e4d38c7eeb5d60ea895/pytest-fixtures-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "a8c9d01c39613bce945a86ea5b8b25a1", "sha256": "63097991d731cb26f49f005cfb3122aa9687654a312311496d8043319800b7cc" }, "downloads": -1, "filename": "pytest-fixtures-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a8c9d01c39613bce945a86ea5b8b25a1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4915, "upload_time": "2018-05-16T06:17:44", "url": "https://files.pythonhosted.org/packages/fb/13/b393bf6cde348f8d031ae0339a05e07c9cb0f55cd7fc663d73d6ac6c8dbd/pytest-fixtures-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "bbe4ca97106917c4d46b01c5a45819f6", "sha256": "026943a2665c534cf56de114b3d9e77949800989688db58ee718081016c2fff3" }, "downloads": -1, "filename": "pytest-fixtures-0.0.5.tar.gz", "has_sig": false, "md5_digest": "bbe4ca97106917c4d46b01c5a45819f6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5128, "upload_time": "2018-05-16T06:25:56", "url": "https://files.pythonhosted.org/packages/c9/92/4c66df428f35b2b66ef6d51a885310731a0ac2cd8c200758729e46e06516/pytest-fixtures-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "791a02db5e912ffe80587378d7d4049c", "sha256": "1f8e390eb0deaa858b2ed8a8bd3c754a62feae49f6f1bf1479a020316dd8de7c" }, "downloads": -1, "filename": "pytest_fixtures-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "791a02db5e912ffe80587378d7d4049c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 3182, "upload_time": "2018-06-05T20:22:25", "url": "https://files.pythonhosted.org/packages/09/40/24563b667bb9210afbb0815b39a1d55a5d89870863ac288d30530405b5fe/pytest_fixtures-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "56eeff094a16d887a7158ec21ccd8ffe", "sha256": "ab9e98455f2305da19ca54f04bb1164697b9509e35389eb9bad184d46b22ab62" }, "downloads": -1, "filename": "pytest-fixtures-0.0.6.tar.gz", "has_sig": false, "md5_digest": "56eeff094a16d887a7158ec21ccd8ffe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5142, "upload_time": "2018-06-05T20:22:26", "url": "https://files.pythonhosted.org/packages/97/b4/57fcd4263ae5a08c45fdebc3ac9130d6c8c5356ddff92b7253591a919d29/pytest-fixtures-0.0.6.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "749c2ba3f6fbffd2497d9036d643ad96", "sha256": "8372ad1cd6dafd7e53b183b8601d1a85cda7bd829e7f73fae18416e95d270a3e" }, "downloads": -1, "filename": "pytest_fixtures-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "749c2ba3f6fbffd2497d9036d643ad96", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4937, "upload_time": "2019-05-01T21:25:15", "url": "https://files.pythonhosted.org/packages/0c/d8/75876c6c77d4f79faaf7ecef0c6532820e4ade5936f4797a8dd4c1ff79db/pytest_fixtures-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "792d06ac629726e7286c9aa526384618", "sha256": "28f13dc9fb9206f4a5fba1a100e1b3de20fbfa37a7af440ca07222fa45b85b7b" }, "downloads": -1, "filename": "pytest-fixtures-0.1.0.tar.gz", "has_sig": false, "md5_digest": "792d06ac629726e7286c9aa526384618", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6305, "upload_time": "2019-05-01T21:25:16", "url": "https://files.pythonhosted.org/packages/f7/25/3b7527e005df1dfe040091c3fc6ce75a0670c8e458773678f96d184b3017/pytest-fixtures-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "749c2ba3f6fbffd2497d9036d643ad96", "sha256": "8372ad1cd6dafd7e53b183b8601d1a85cda7bd829e7f73fae18416e95d270a3e" }, "downloads": -1, "filename": "pytest_fixtures-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "749c2ba3f6fbffd2497d9036d643ad96", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4937, "upload_time": "2019-05-01T21:25:15", "url": "https://files.pythonhosted.org/packages/0c/d8/75876c6c77d4f79faaf7ecef0c6532820e4ade5936f4797a8dd4c1ff79db/pytest_fixtures-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "792d06ac629726e7286c9aa526384618", "sha256": "28f13dc9fb9206f4a5fba1a100e1b3de20fbfa37a7af440ca07222fa45b85b7b" }, "downloads": -1, "filename": "pytest-fixtures-0.1.0.tar.gz", "has_sig": false, "md5_digest": "792d06ac629726e7286c9aa526384618", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6305, "upload_time": "2019-05-01T21:25:16", "url": "https://files.pythonhosted.org/packages/f7/25/3b7527e005df1dfe040091c3fc6ce75a0670c8e458773678f96d184b3017/pytest-fixtures-0.1.0.tar.gz" } ] }