{"id":16130193,"url":"https://github.com/lambdacasserole/exhaustion","last_synced_at":"2025-04-06T14:14:55.381Z","repository":{"id":56778444,"uuid":"524937268","full_name":"lambdacasserole/exhaustion","owner":"lambdacasserole","description":"A tiny library to help in exhaustive testing of Boolean functions in Python.","archived":false,"fork":false,"pushed_at":"2022-08-15T19:00:12.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-30T05:01:53.907Z","etag":null,"topics":["boolean-function","exhaustive-search","formal-verification","python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdacasserole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-15T10:04:53.000Z","updated_at":"2024-03-17T21:09:11.000Z","dependencies_parsed_at":"2022-08-16T02:40:32.842Z","dependency_job_id":null,"html_url":"https://github.com/lambdacasserole/exhaustion","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fexhaustion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fexhaustion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fexhaustion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fexhaustion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdacasserole","download_url":"https://codeload.github.com/lambdacasserole/exhaustion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492543,"owners_count":20947545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boolean-function","exhaustive-search","formal-verification","python","testing"],"created_at":"2024-10-09T22:14:57.655Z","updated_at":"2025-04-06T14:14:55.358Z","avatar_url":"https://github.com/lambdacasserole.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# exhaustion\nA tiny library to help in exhaustive testing of Boolean functions in Python.\n\n![Logo](https://raw.githubusercontent.com/lambdacasserole/exhaustion/main/logo.svg)\n\n## Requirements\n\n- Python 3.6 or newer\n\n## Installation\n\nExhaustion can be installed using `pip`:\n\n```sh\npip install exhaustion\n```\n\n## Usage\n\nUsage is very straightforward, `exhaustion` is compatible with any testing library that supports assertions.\n\n```python\nimport unittest\n\nfrom exhaustion import exhaust\n\ndef _and(a: bool, b: bool):\n    \"\"\" A simple wrapper over the Python `and` operator for demonstration purposes.\n\n    Args:\n        a (bool): The left-hand operand.\n        b (bool): The right-hand operand.\n    Returns:\n        bool: The Boolean conjunction of the arguments provided.\n    \"\"\"\n    return a and b\n\nclass TestAndAlgebraic(unittest.TestCase):\n    \"\"\" Tests the algebraic properties of the _and function.\n    \"\"\"\n\n    def test_and_commutative(self):\n        \"\"\" Proves by exhaustion that the _and function is commutative.\n        \"\"\"\n        # The lambda below will execute for every possible combination of Boolean arguments.\n        exhaust(lambda a, b: self.assertTrue(_and(a, b) == _and(b, a)))\n```\n\n## Related Projects\n\nThis library is intentionally very minimal, and was designed to be so. If you're looking for a richer feature set, you might consider the following projects:\n\n- [exhaust](https://github.com/letmaik/exhaust) - Not to be confused with this project, a library that supports exhastive enumeration of any finite set you can express using a generator function.\n\n## License\n\n[MIT](LICENSE) © [lambdacasserole](https://github.com/lambdacasserole).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fexhaustion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdacasserole%2Fexhaustion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fexhaustion/lists"}