{ "info": { "author": "Xavier Barbosa", "author_email": "clint.northwood@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Testing" ], "description": "pytest-curio: pytest support for curio\n======================================\n\ncurio_ code is written in the form of async/await, which makes it slightly more\ndifficult to test using normal testing tools. pytest-curio provides useful\nfixtures and markers to make testing easier.\n\n.. code-block:: python\n\n @pytest.mark.curio\n async def test_some_curio_code():\n res = await library.do_something()\n assert b'expected result' == res\n\npytest-curio has been strongly influenced by pytest-asyncio_.\n\n.. _curio: https://github.com/dabeaz/curio\n.. _pytest-asyncio: https://github.com/pytest-dev/pytest-asyncio\n\nFeatures\n--------\n\n- fixtures for creating and injecting versions of the curio kernel\n- fixtures for injecting unused tcp ports\n- pytest markers for treating tests as curio coroutines\n\n\nInstallation\n------------\n\nTo install pytest-curio, simply:\n\n.. code-block:: bash\n\n $ pip install pytest-curio\n\nThis is enough for pytest to pick up pytest-curio.\n\nFixtures\n--------\n\n``kernel``\n~~~~~~~~~~\nCreates and injects a new instance of the default curio kernel. The kernel\nwill be stoped at the end of the test.\n\nNote that just using the ``kernel`` fixture won't make your test function a\ncoroutine. You'll need to interact with the kernel directly, using methods\nlike ``kernel.run``. See the ``pytest.mark.curio`` marker for treating test\nfunctions like coroutines.\n\n.. code-block:: python\n\n def test_http_client(kernel):\n result = []\n async def my_coroutine(obj):\n result.append(obj)\n url = 'http://httpbin.org/get'\n task = kernel.run(my_coroutine(url))\n assert url in result\n\nMarkers\n-------\n\n``pytest.mark.curio``\n~~~~~~~~~~~~~~~~~~~~~\nMark your test coroutine with this marker and pytest will execute it as an\ncurio task using the kernel provided by the ``kernel`` fixture. See the\nintroductory section for an example.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/johnnoone/pytest-curio", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pytest-curio", "package_url": "https://pypi.org/project/pytest-curio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytest-curio/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/johnnoone/pytest-curio" }, "release_url": "https://pypi.org/project/pytest-curio/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Pytest support for curio.", "version": "0.1.0" }, "last_serial": 1900669, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4ca1e003f0a5d70df73358e670fc4f8f", "sha256": "b3b870501ca55d61e9e1f8972669dc5f341fd25f559dd10a6a7239da7b73fca0" }, "downloads": -1, "filename": "pytest_curio-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4ca1e003f0a5d70df73358e670fc4f8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3851, "upload_time": "2016-01-12T11:30:12", "url": "https://files.pythonhosted.org/packages/3a/14/cc4664ae47ea6523d06854ee46c02bf7735dd4c9784812e3bdc0d8044bcb/pytest_curio-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "293ef3c5fa2042fa210299a11f7c40a7", "sha256": "a5969ac515ac3e41de4399bd4b6f9f00c815500eef5f90e96432ce456dcd513d" }, "downloads": -1, "filename": "pytest-curio-0.1.0.tar.gz", "has_sig": false, "md5_digest": "293ef3c5fa2042fa210299a11f7c40a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17640, "upload_time": "2016-01-12T11:30:37", "url": "https://files.pythonhosted.org/packages/66/a1/ef64ed8bf855a825573b0b69f30bb52f69f8f37258996742cb158bcf4c5a/pytest-curio-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4ca1e003f0a5d70df73358e670fc4f8f", "sha256": "b3b870501ca55d61e9e1f8972669dc5f341fd25f559dd10a6a7239da7b73fca0" }, "downloads": -1, "filename": "pytest_curio-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4ca1e003f0a5d70df73358e670fc4f8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3851, "upload_time": "2016-01-12T11:30:12", "url": "https://files.pythonhosted.org/packages/3a/14/cc4664ae47ea6523d06854ee46c02bf7735dd4c9784812e3bdc0d8044bcb/pytest_curio-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "293ef3c5fa2042fa210299a11f7c40a7", "sha256": "a5969ac515ac3e41de4399bd4b6f9f00c815500eef5f90e96432ce456dcd513d" }, "downloads": -1, "filename": "pytest-curio-0.1.0.tar.gz", "has_sig": false, "md5_digest": "293ef3c5fa2042fa210299a11f7c40a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17640, "upload_time": "2016-01-12T11:30:37", "url": "https://files.pythonhosted.org/packages/66/a1/ef64ed8bf855a825573b0b69f30bb52f69f8f37258996742cb158bcf4c5a/pytest-curio-0.1.0.tar.gz" } ] }