{ "info": { "author": "Eugeniy Kalinin", "author_email": "burump@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: Software Development :: Testing" ], "description": "pytest-tornado\n==============\n\n.. image:: https://travis-ci.org/eugeniy/pytest-tornado.svg?branch=master\n :target: https://travis-ci.org/eugeniy/pytest-tornado\n\n.. image:: https://coveralls.io/repos/eugeniy/pytest-tornado/badge.svg\n :target: https://coveralls.io/r/eugeniy/pytest-tornado\n\nA py.test_ plugin providing fixtures and markers to simplify testing\nof asynchronous tornado applications.\n\nInstallation\n------------\n\n::\n\n pip install pytest-tornado\n\n\nExample\n-------\n\n.. code-block:: python\n\n import pytest\n import tornado.web\n\n class MainHandler(tornado.web.RequestHandler):\n def get(self):\n self.write(\"Hello, world\")\n\n application = tornado.web.Application([\n (r\"/\", MainHandler),\n ])\n\n @pytest.fixture\n def app():\n return application\n\n @pytest.mark.gen_test\n def test_hello_world(http_client, base_url):\n response = yield http_client.fetch(base_url)\n assert response.code == 200\n\n\nRunning tests\n-------------\n\n::\n\n py.test\n\n\nFixtures\n--------\n\nio_loop\n creates an instance of the `tornado.ioloop.IOLoop`_ for each test case\n\nhttp_port\n get a port used by the test server\n\nbase_url\n Get an absolute base url for the test server,\n for example ``http://localhost:59828``.\n Can also be used in a test with HTTPS fixture and will then return\n a corresponding url, for example ``http://localhost:48372``.\n\nhttp_server\n start a tornado HTTP server, you must create an ``app`` fixture,\n which returns the `tornado.web.Application`_ to be tested\n\nhttp_client\n get an asynchronous HTTP client\n\n\nThere is also the possibility to test applications with HTTPS.\nFor running a server with HTTPS you need a certificate.\n\nhttps_port\n Get a port used by the test server.\n\nhttps_server\n Start a tornado HTTPS server. You must create an ``app`` fixture,\n which returns the `tornado.web.Application`_ to be tested, and\n an ``ssl_options`` fixture which returns the SSL options for the\n `tornado.httpserver.HTTPServer`_.\n\nhttps_client\n Get an asynchronous HTTP client.\n In case your test uses an self-signed certificate you can set\n ``verify=False`` on the fetch method.\n\n\nShow fixtures provided by the plugin::\n\n py.test --fixtures\n\n\nMarkers\n-------\n\nA ``gen_test`` marker lets you write a coroutine-style tests used with the\n`tornado.gen`_ module:\n\n.. code-block:: python\n\n @pytest.mark.gen_test\n def test_tornado(http_client):\n response = yield http_client.fetch('http://www.tornadoweb.org/')\n assert response.code == 200\n\n\nThis marker supports writing tests with async/await syntax as well:\n\n.. code-block:: python\n\n @pytest.mark.gen_test\n async def test_tornado(http_client):\n response = await http_client.fetch('http://www.tornadoweb.org/')\n assert response.code == 200\n\n\nMarked tests will time out after 5 seconds. The timeout can be modified by\nsetting an ``ASYNC_TEST_TIMEOUT`` environment variable,\n``--async-test-timeout`` command line argument or a marker argument.\n\n.. code-block:: python\n\n @pytest.mark.gen_test(timeout=5)\n def test_tornado(http_client):\n yield http_client.fetch('http://www.tornadoweb.org/')\n\nThe mark can also receive a run_sync flag, which if turned off will, instead of running the test synchronously, will add it as a coroutine and run the IOLoop (until the timeout). For instance, this allows to test things on both a client and a server at the same time.\n\n.. code-block:: python\n\n @pytest.mark.gen_test(run_sync=False)\n def test_tornado(http_server, http_client):\n response = yield http_client.fetch('http://localhost:5555/my_local_server_test/')\n assert response.body == 'Run on the same IOLoop!'\n\n\nShow markers provided by the plugin::\n\n py.test --markers\n\n\n.. _py.test: http://pytest.org/\n.. _`tornado.httpserver.HTTPServer`: https://www.tornadoweb.org/en/latest/httpserver.html#http-server\n.. _`tornado.ioloop.IOLoop`: http://tornado.readthedocs.org/en/latest/ioloop.html#ioloop-objects\n.. _`tornado.web.Application`: http://tornado.readthedocs.org/en/latest/web.html#application-configuration\n.. _`tornado.gen`: http://tornado.readthedocs.org/en/latest/gen.html\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/eugeniy/pytest-tornado", "keywords": "pytest py.test tornado async asynchronous testing unit tests plugin", "license": "Apache License, Version 2.0", "maintainer": "Vidar Tonaas Fauske", "maintainer_email": "vidartf@gmail.com", "name": "pytest-tornado", "package_url": "https://pypi.org/project/pytest-tornado/", "platform": "", "project_url": "https://pypi.org/project/pytest-tornado/", "project_urls": { "Homepage": "https://github.com/eugeniy/pytest-tornado" }, "release_url": "https://pypi.org/project/pytest-tornado/0.8.0/", "requires_dist": [ "pytest (>=3.6)", "tornado (>=4.1)" ], "requires_python": "", "summary": "A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications.", "version": "0.8.0" }, "last_serial": 5267122, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "5c3793965a87fc252516f756386ada3d", "sha256": "7974db65cb386d7881ca520292387c93815bcc5fc0fede8a924c4e120c79e22b" }, "downloads": -1, "filename": "pytest_tornado-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5c3793965a87fc252516f756386ada3d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6836, "upload_time": "2015-02-13T10:16:58", "url": "https://files.pythonhosted.org/packages/8f/54/f2f768fe132ecd903ba65d5136495408b8f0d769778824ae84a0f35e19d9/pytest_tornado-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5d6245fa04a6266595ad883ecd0830c", "sha256": "77c65df749084d3b305aa8b697a3557dcbf3c75e2c10f998c61c1692ab18dee9" }, "downloads": -1, "filename": "pytest-tornado-0.4.1.tar.gz", "has_sig": false, "md5_digest": "c5d6245fa04a6266595ad883ecd0830c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4277, "upload_time": "2015-02-13T10:17:00", "url": "https://files.pythonhosted.org/packages/ea/ad/a08880c259a3065ce190286f33ea0ddf0876aba13886b7112700db9aa576/pytest-tornado-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "0b9ae9ffd7a7179c9ce7c7b1f9aece0d", "sha256": "9bb9b5d573492bdede01fa20e6720cad7ceb85b59bc6376ddf0beb45cbc23053" }, "downloads": -1, "filename": "pytest_tornado-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0b9ae9ffd7a7179c9ce7c7b1f9aece0d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6240, "upload_time": "2015-02-20T04:15:56", "url": "https://files.pythonhosted.org/packages/b1/d4/3776f23d03d3ff321bc467e1228448983eafbfe3987169d83dda1414b4d4/pytest_tornado-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c32adf5356104a4414f71937db257c25", "sha256": "924f760f72285504dfc99ffd4e37479a3835c9f55efa0221568d8a6a29c0539e" }, "downloads": -1, "filename": "pytest-tornado-0.4.2.tar.gz", "has_sig": false, "md5_digest": "c32adf5356104a4414f71937db257c25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3844, "upload_time": "2015-02-20T04:15:54", "url": "https://files.pythonhosted.org/packages/01/95/c3ff0d83e0d132c4744d2cc200c46aff9d7fd26458ad96f9b31eca6990a3/pytest-tornado-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "9039d58244edc11cb3e933995c519200", "sha256": "ad3613242802ab327665f0bc04a4ad481cc36703bc47e7f0d09e03fbe0c4250f" }, "downloads": -1, "filename": "pytest_tornado-0.4.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9039d58244edc11cb3e933995c519200", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6354, "upload_time": "2015-05-17T15:21:04", "url": "https://files.pythonhosted.org/packages/83/a3/909129364c6425ced1fefc53880dd6bb4cd6efdcf63083ab84bdf381bc4d/pytest_tornado-0.4.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5885a5bb59d6ef301a2be997edf80c5", "sha256": "0436a326b7ec660ca0d876338de84e486c3330d6c4c7fcc212339ba0e3589b52" }, "downloads": -1, "filename": "pytest-tornado-0.4.3.tar.gz", "has_sig": false, "md5_digest": "a5885a5bb59d6ef301a2be997edf80c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3932, "upload_time": "2015-05-17T15:21:08", "url": "https://files.pythonhosted.org/packages/45/22/8393236e00742f93cbf004f8b51707d32c903acdc28233112d58480edf2b/pytest-tornado-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "2228cd06faa55df1aa21da41a52e0076", "sha256": "d02097a97b3e45534f4656fd9a5a806eb89344c732e4e31fe9c322471da989da" }, "downloads": -1, "filename": "pytest_tornado-0.4.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2228cd06faa55df1aa21da41a52e0076", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6354, "upload_time": "2015-06-02T13:02:50", "url": "https://files.pythonhosted.org/packages/ee/69/ef9c98cccbfe543ecc6db58f65df1bd47e2c112223ef421bc9cafd2bff1e/pytest_tornado-0.4.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f82cf83473577d17c5d54f73d31d96c", "sha256": "5882779d3cf0f6147b08bbda7d8781af63b71ea967c8370e508b57d92986e2a5" }, "downloads": -1, "filename": "pytest-tornado-0.4.4.tar.gz", "has_sig": false, "md5_digest": "9f82cf83473577d17c5d54f73d31d96c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3937, "upload_time": "2015-06-02T13:02:46", "url": "https://files.pythonhosted.org/packages/d6/43/f3eb339040e8e59c156b8172dd698ffb13c995461c3de729bdb12e5eaf56/pytest-tornado-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "64a37862221c8b6daf1be101cd4de434", "sha256": "16aa582dc2638ba8e5a7e44ab0f6a6480a86c8b0aeda7b18f3aa0539d3256647" }, "downloads": -1, "filename": "pytest_tornado-0.4.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "64a37862221c8b6daf1be101cd4de434", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7227, "upload_time": "2016-02-22T19:58:42", "url": "https://files.pythonhosted.org/packages/a7/ea/7cd1f5b245364102b829e97ac9e73b5ff445e64d29c9c8c220f9f4c40380/pytest_tornado-0.4.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b6ccf5c7f18a9d1a9e399612ef4b0c03", "sha256": "28b772d8dbea3d98da94d6697f739652a373b35123e0ed60af77557c6a2c392c" }, "downloads": -1, "filename": "pytest-tornado-0.4.5.tar.gz", "has_sig": false, "md5_digest": "b6ccf5c7f18a9d1a9e399612ef4b0c03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4685, "upload_time": "2016-02-22T19:58:47", "url": "https://files.pythonhosted.org/packages/18/f4/54a40ea6b8c2a1ce803d3383294c1eaf7bd0546bff9d777d76bb824bd8c3/pytest-tornado-0.4.5.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "98b119acad54e8ad6293862d74fe2743", "sha256": "687c1f9c0f5bda7808c1e53c14bbebfe4fb9452e34cc95b440e598d4724265e0" }, "downloads": -1, "filename": "pytest_tornado-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "98b119acad54e8ad6293862d74fe2743", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4985, "upload_time": "2018-04-21T19:18:25", "url": "https://files.pythonhosted.org/packages/1f/27/9ba72f17b82488731a41cbc0c18115741f28ec36386fa1d05f2408fbbadf/pytest_tornado-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bdd5ddb89d3694ab7785cdd6e437b252", "sha256": "214fc59d06fb81696fce3028b56dff522168ac1cfc784cfc0077b7b1e425b4cd" }, "downloads": -1, "filename": "pytest-tornado-0.5.0.tar.gz", "has_sig": false, "md5_digest": "bdd5ddb89d3694ab7785cdd6e437b252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4698, "upload_time": "2018-04-21T19:18:27", "url": "https://files.pythonhosted.org/packages/df/a1/699a71ba95668ecca59a005b07c756a1e3a8dba6ee29b728f1f2cc0676bc/pytest-tornado-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "0bc964dc5288547c216bade55d5fda29", "sha256": "a9f650f7423605aee4771d118b09b1b802eb74dab3a84e74896bb20aae0dc93d" }, "downloads": -1, "filename": "pytest_tornado-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0bc964dc5288547c216bade55d5fda29", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9037, "upload_time": "2019-03-28T17:59:56", "url": "https://files.pythonhosted.org/packages/7b/22/207d97612a8b285f16b5010fcd3c9b8b02ce0240b1c66269de05d39f93bf/pytest_tornado-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc1bfaf83b62d0411edf2ff99bc24c51", "sha256": "1cbb552deca8908e77d995c91b1e0cc538275f1cb277c4ffa93380d49496bc59" }, "downloads": -1, "filename": "pytest-tornado-0.6.0.tar.gz", "has_sig": false, "md5_digest": "fc1bfaf83b62d0411edf2ff99bc24c51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8563, "upload_time": "2019-03-28T17:59:57", "url": "https://files.pythonhosted.org/packages/a4/7f/4a634b8a0925a36d4041e0829df6ba8ec7a9f351c4e7b6f550d890f28330/pytest-tornado-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "a4c20a9818c779944d7ed3625b86b756", "sha256": "ad76fa156537840ae0e881543a1874438d992b47a75ef3e825578c327e92426e" }, "downloads": -1, "filename": "pytest_tornado-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a4c20a9818c779944d7ed3625b86b756", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9037, "upload_time": "2019-04-08T09:56:27", "url": "https://files.pythonhosted.org/packages/69/28/0ed10d3414db046ac2684a4183af2cfbd693ab2289a369eaa1fe689f5e1c/pytest_tornado-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "63f63257b5888b836e82394af44223b7", "sha256": "842eaab0d92a717fef47260912549989293e493687ed63bead1ab6663094674b" }, "downloads": -1, "filename": "pytest-tornado-0.7.0.tar.gz", "has_sig": false, "md5_digest": "63f63257b5888b836e82394af44223b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8486, "upload_time": "2019-04-08T09:56:28", "url": "https://files.pythonhosted.org/packages/dd/02/1ec1787c4b71731872f9ba59ff5d6952f621aa4b13f2a08dcbf6d50d870f/pytest-tornado-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "971fa361f2fbd704c7bddba016bf6316", "sha256": "875d4047183d9e9a8b8bbba3ca762e27d7bf2205791444b2e0768e5a58a4d84c" }, "downloads": -1, "filename": "pytest_tornado-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "971fa361f2fbd704c7bddba016bf6316", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9503, "upload_time": "2019-05-14T12:29:52", "url": "https://files.pythonhosted.org/packages/38/c7/de0a9f700743365c3e9537ec870c768e2c0b8c23d73f02abc13f53294695/pytest_tornado-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e5d70b1af340bda99ed769bd7cb38c6", "sha256": "dfb9ed51966a79df9427d931afaae562ab14074f614f6320369acac8e2c18a59" }, "downloads": -1, "filename": "pytest-tornado-0.8.0.tar.gz", "has_sig": false, "md5_digest": "7e5d70b1af340bda99ed769bd7cb38c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9055, "upload_time": "2019-05-14T12:29:53", "url": "https://files.pythonhosted.org/packages/e7/c8/965e0010a9526de52af547d9709218dca66d400893f656035211a813774a/pytest-tornado-0.8.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "971fa361f2fbd704c7bddba016bf6316", "sha256": "875d4047183d9e9a8b8bbba3ca762e27d7bf2205791444b2e0768e5a58a4d84c" }, "downloads": -1, "filename": "pytest_tornado-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "971fa361f2fbd704c7bddba016bf6316", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9503, "upload_time": "2019-05-14T12:29:52", "url": "https://files.pythonhosted.org/packages/38/c7/de0a9f700743365c3e9537ec870c768e2c0b8c23d73f02abc13f53294695/pytest_tornado-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e5d70b1af340bda99ed769bd7cb38c6", "sha256": "dfb9ed51966a79df9427d931afaae562ab14074f614f6320369acac8e2c18a59" }, "downloads": -1, "filename": "pytest-tornado-0.8.0.tar.gz", "has_sig": false, "md5_digest": "7e5d70b1af340bda99ed769bd7cb38c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9055, "upload_time": "2019-05-14T12:29:53", "url": "https://files.pythonhosted.org/packages/e7/c8/965e0010a9526de52af547d9709218dca66d400893f656035211a813774a/pytest-tornado-0.8.0.tar.gz" } ] }