{ "info": { "author": "Emmanuel Leblond", "author_email": "emmanuel.leblond@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Hypothesis", "Framework :: Trio", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing", "Topic :: System :: Networking" ], "description": "===============\nhypothesis-trio\n===============\n\n.. image:: https://travis-ci.org/python-trio/hypothesis-trio.svg?branch=master\n :target: https://travis-ci.org/python-trio/hypothesis-trio\n\n.. image:: https://codecov.io/gh/python-trio/hypothesis-trio/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/python-trio/hypothesis-trio\n\nWelcome to `hypothesis-trio `__!\n\nHypothesis supports Trio out of the box for non-stateful tests.\nThis project aims at supporting the stateful mode ;-)\n\nLicense: Your choice of MIT or Apache License 2.0\n\n\nUsage\n=====\n\nReplace ``hypothesis.stateful.RuleBasedStateMachine`` by ``hypothesis_trio.stateful.TrioRuleBasedStateMachine``:\n\n.. code-block:: python\n\n from hypothesis_trio.stateful import TrioRuleBasedStateMachine, run_state_machine_as_test\n\n\n def test_trio_number_modifier(hypothesis_settings):\n class NumberModifier(TrioRuleBasedStateMachine):\n\n folders = Bundle('folders')\n files = Bundle('files')\n\n @initialize(target=folders)\n async def init_folders(self):\n await trio.sleep(0)\n return '/'\n\n @rule(target=folders, name=name_strategy)\n async def create_folder(self, parent, name):\n await trio.sleep(0)\n return '%s/%s' % (parent, name)\n\n @rule(target=files, name=name_strategy)\n async def create_file(self, parent, name):\n await trio.sleep(0)\n return '%s/%s' % (parent, name)\n\n async def teardown(self):\n await trio.sleep(0)\n\n run_state_machine_as_test(NumberModifier, settings=hypothesis_settings)\n\n\nSupport for Trio-Asyncio\n=========================\n\n\n`trio-asyncio `__ allows to mix asyncio and trio code altogether.\nTo support it in your test, you should use ``hypothesis_trio.stateful.TrioAsyncioRuleBasedStateMachine``:\n\n.. code-block:: python\n\n class CheckAsyncioLoop(TrioAsyncioRuleBasedStateMachine):\n\n @initialize()\n async def initialize(self):\n assert self.get_asyncio_loop() == asyncio.get_event_loop()\n await trio_asyncio.aio_as_trio(lambda: asyncio.sleep(0))\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/python-trio/hypothesis-trio", "keywords": "async,hypothesis,testing,trio", "license": "MPL 2.0", "maintainer": "", "maintainer_email": "", "name": "hypothesis-trio", "package_url": "https://pypi.org/project/hypothesis-trio/", "platform": "", "project_url": "https://pypi.org/project/hypothesis-trio/", "project_urls": { "Homepage": "https://github.com/python-trio/hypothesis-trio" }, "release_url": "https://pypi.org/project/hypothesis-trio/0.4.0/", "requires_dist": [ "hypothesis (~=4.0)", "trio (>=0.11)" ], "requires_python": ">=3.5", "summary": "Hypothesis plugin for trio", "version": "0.4.0" }, "last_serial": 5451213, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f1f42adbd5322ee3e4854678ecba2c5c", "sha256": "5cd35bafa7c865a6e526f9ed72dd77cf0a3a115d8036e0af99e95a2d044300ab" }, "downloads": -1, "filename": "hypothesis_trio-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f1f42adbd5322ee3e4854678ecba2c5c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4919, "upload_time": "2018-07-16T17:58:28", "url": "https://files.pythonhosted.org/packages/18/7b/3b7c71492c8a3cf7fac48410a8bb1f796aa422bd647982b98acc09e7697a/hypothesis_trio-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57e473046d44b304e549e8e231abdd93", "sha256": "def38e3823bd88b805fb55ad5b52b3bcbc6706cb5390164d34ccccd045d618a4" }, "downloads": -1, "filename": "hypothesis-trio-0.1.0.tar.gz", "has_sig": false, "md5_digest": "57e473046d44b304e549e8e231abdd93", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 14401, "upload_time": "2018-07-16T17:58:30", "url": "https://files.pythonhosted.org/packages/78/81/3a1d88a2a11cd0ad59ea3a48bed93972a73ef58cb110f60c6c801df28849/hypothesis-trio-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "dfaa31145611c698435377479d8e3a1a", "sha256": "e45a018c48d3821632a22a5081fa2b821dda9023cb811b60a076c487594751b3" }, "downloads": -1, "filename": "hypothesis_trio-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "dfaa31145611c698435377479d8e3a1a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4909, "upload_time": "2018-07-16T18:19:36", "url": "https://files.pythonhosted.org/packages/57/20/baf7e58cdfd2eb2195b37ea5a12f368b28bb41b07ba20af831bfe0e1dd68/hypothesis_trio-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06059816eb247a51ed9589549f3d8934", "sha256": "3db9ef9e0be213bc577b220a8606c9648ffddc3936fc4bd7e1083fb3dc993a7c" }, "downloads": -1, "filename": "hypothesis-trio-0.2.0.tar.gz", "has_sig": false, "md5_digest": "06059816eb247a51ed9589549f3d8934", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 14510, "upload_time": "2018-07-16T18:19:37", "url": "https://files.pythonhosted.org/packages/49/54/da25e5858f3daa7738808d1e6a35c16c45c65ce1c4426177cf7b891002c3/hypothesis-trio-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "78a19c404b52c892318b87f2d8edd6a1", "sha256": "e449911616ea4165d200b4cb3998e2dbef070db636838544e10d2bbf89e7c76e" }, "downloads": -1, "filename": "hypothesis_trio-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "78a19c404b52c892318b87f2d8edd6a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5535, "upload_time": "2018-07-17T07:43:15", "url": "https://files.pythonhosted.org/packages/fe/e4/aeb37ba4f0a3dc2262723d745eddb44b42f6405d555e0779cdcef89f86af/hypothesis_trio-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea46f42d5263942eb2b3de3995dcc388", "sha256": "e9f687578207c5e2676167b30c2fcedb49543668c50a15d20d3794f1b6ace648" }, "downloads": -1, "filename": "hypothesis-trio-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ea46f42d5263942eb2b3de3995dcc388", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 14701, "upload_time": "2018-07-17T07:43:17", "url": "https://files.pythonhosted.org/packages/f7/27/6556b0cc31154e16e38558e022f6c2ecef6d82f31e0a925e5effc9799993/hypothesis-trio-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "94964c6679a2f72fad9932b4f2762bd4", "sha256": "e820ae49df749317d714f8feb7a517ee164966974dcb60b3efd9fe5bf4d342d3" }, "downloads": -1, "filename": "hypothesis_trio-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "94964c6679a2f72fad9932b4f2762bd4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 6178, "upload_time": "2018-08-29T15:22:44", "url": "https://files.pythonhosted.org/packages/8b/75/0087acd0dfa8067f0d083b518781daf37e9d10bb04a4359b5ea892ccfa3f/hypothesis_trio-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64fabad9e1a9326eb6736e4e3df98628", "sha256": "52b1d459745c7bcb541c411565925f9e9968cb9fde50b53c38b63da345efce71" }, "downloads": -1, "filename": "hypothesis-trio-0.2.2.tar.gz", "has_sig": false, "md5_digest": "64fabad9e1a9326eb6736e4e3df98628", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15341, "upload_time": "2018-08-29T15:22:46", "url": "https://files.pythonhosted.org/packages/2c/3a/9bdae13ba66ac84b61eddffc336c365ae51f2250e7c677b8b0a650ef33fc/hypothesis-trio-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2a1a43c9546de37bd548b1eea8ebb99d", "sha256": "38a6d2e1cb6c7b5f980960ac579a788b585096935e7884e8bbc5aa23f31475f0" }, "downloads": -1, "filename": "hypothesis_trio-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2a1a43c9546de37bd548b1eea8ebb99d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 12379, "upload_time": "2019-02-11T08:42:09", "url": "https://files.pythonhosted.org/packages/06/94/e90257171c3c11194b364add0a2cdcc06408b966057d61f517ddafff6f31/hypothesis_trio-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd243fdccb4ba21f2a7d4be34ee011ef", "sha256": "c7f001cd240cc8e81ca57d813706afed470226b65b2d33e872408d046d4d96f4" }, "downloads": -1, "filename": "hypothesis-trio-0.3.0.tar.gz", "has_sig": false, "md5_digest": "cd243fdccb4ba21f2a7d4be34ee011ef", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 16298, "upload_time": "2019-02-11T08:42:10", "url": "https://files.pythonhosted.org/packages/34/c6/dbc954de38c37a82d935121a0f066bbc890d80f5a20444d65fcfcdfd00ff/hypothesis-trio-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "39d3bc7ef3ce9a787bb188244bce869e", "sha256": "08a2e015c97a93bb08c1935413bf98961697d465b0b92f5867c2caaf7d11e1fd" }, "downloads": -1, "filename": "hypothesis-trio-0.3.1.tar.gz", "has_sig": false, "md5_digest": "39d3bc7ef3ce9a787bb188244bce869e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 17790, "upload_time": "2019-02-13T09:44:35", "url": "https://files.pythonhosted.org/packages/3f/11/275e870aefa4ce9d137eb6f4e788e925fb9494a7ca5ad7ac50ce19b51813/hypothesis-trio-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "015588fa3fe5cc4e451a21fe9a54e440", "sha256": "8a0b0f0f524cb43a45494e19df7f6db97c96e391e4376f68fe719c2b03c008a2" }, "downloads": -1, "filename": "hypothesis_trio-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "015588fa3fe5cc4e451a21fe9a54e440", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 13932, "upload_time": "2019-06-26T11:46:17", "url": "https://files.pythonhosted.org/packages/79/20/8c1e9e43d6ad402f723249d7eba5e9393ff16ff5f73ba4252b98c9bba1fc/hypothesis_trio-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "077b49dc49c5f9e0781abd6b8cabb1ed", "sha256": "603f39d8a20c0d303e2f5167b1686e8403684dab8cd2839f6bbe7926c97c4201" }, "downloads": -1, "filename": "hypothesis-trio-0.4.0.tar.gz", "has_sig": false, "md5_digest": "077b49dc49c5f9e0781abd6b8cabb1ed", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 18019, "upload_time": "2019-06-26T11:46:19", "url": "https://files.pythonhosted.org/packages/51/36/74c82e4cfc755f822f5d37164787ee967df5162af30995c0cab660c9c720/hypothesis-trio-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "015588fa3fe5cc4e451a21fe9a54e440", "sha256": "8a0b0f0f524cb43a45494e19df7f6db97c96e391e4376f68fe719c2b03c008a2" }, "downloads": -1, "filename": "hypothesis_trio-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "015588fa3fe5cc4e451a21fe9a54e440", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 13932, "upload_time": "2019-06-26T11:46:17", "url": "https://files.pythonhosted.org/packages/79/20/8c1e9e43d6ad402f723249d7eba5e9393ff16ff5f73ba4252b98c9bba1fc/hypothesis_trio-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "077b49dc49c5f9e0781abd6b8cabb1ed", "sha256": "603f39d8a20c0d303e2f5167b1686e8403684dab8cd2839f6bbe7926c97c4201" }, "downloads": -1, "filename": "hypothesis-trio-0.4.0.tar.gz", "has_sig": false, "md5_digest": "077b49dc49c5f9e0781abd6b8cabb1ed", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 18019, "upload_time": "2019-06-26T11:46:19", "url": "https://files.pythonhosted.org/packages/51/36/74c82e4cfc755f822f5d37164787ee967df5162af30995c0cab660c9c720/hypothesis-trio-0.4.0.tar.gz" } ] }