{"id":40502345,"url":"https://github.com/eitanwass/pytest-case","last_synced_at":"2026-01-20T19:10:52.274Z","repository":{"id":262334564,"uuid":"884471381","full_name":"eitanwass/pytest-case","owner":"eitanwass","description":"A clean, modern, wrapper for pytest.mark.parametrize","archived":false,"fork":false,"pushed_at":"2024-11-27T20:07:19.000Z","size":2786,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-15T10:56:12.766Z","etag":null,"topics":["library","pytest","pytest-plugin","python","testing"],"latest_commit_sha":null,"homepage":"https://eitanwass.github.io/pytest-case/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eitanwass.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-06T20:12:28.000Z","updated_at":"2025-08-14T21:10:41.000Z","dependencies_parsed_at":"2024-11-27T20:26:04.460Z","dependency_job_id":"7aa7c78b-3f23-4144-855b-c3f8fe46ffe2","html_url":"https://github.com/eitanwass/pytest-case","commit_stats":null,"previous_names":["eitanwass/pytest-case"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/eitanwass/pytest-case","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitanwass%2Fpytest-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitanwass%2Fpytest-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitanwass%2Fpytest-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitanwass%2Fpytest-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eitanwass","download_url":"https://codeload.github.com/eitanwass/pytest-case/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eitanwass%2Fpytest-case/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28609853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["library","pytest","pytest-plugin","python","testing"],"created_at":"2026-01-20T19:10:49.296Z","updated_at":"2026-01-20T19:10:52.234Z","avatar_url":"https://github.com/eitanwass.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytest-case\n\n![workflow success](https://github.com/eitanwass/pytest-case/actions/workflows/pytest-case-ci.yml/badge.svg) [![codecov](https://codecov.io/github/eitanwass/pytest-case/graph/badge.svg?token=07NGAILDL2)](https://codecov.io/github/eitanwass/pytest-case) \n\n![PyPI - Downloads](https://img.shields.io/pypi/dm/pytest-case) [![PyPI - Version](https://img.shields.io/pypi/v/pytest-case)](https://pypi.org/project/pytest-case)\n\n\n# Usage examples:\n\n```python\nimport pytest\nfrom typing import Tuple, Generator\nfrom pytest_case import case\n\n\ndef add_test_cases() -\u003e Generator[Tuple[int, int, int]]:\n    yield (\n        n\n        for n in [\n            (3, 3, 6),\n            (3, 4, 7),\n            (-1, 6, 5),\n        ]\n    )\n\n\n@case(\"regular args\", 4, 2, 2)\n@case(\n    \"params as kwargs\",\n    a=2,\n    b=2,\n    expected=1,\n)\n@case('with expected fail', 1, 0, -1, mark=pytest.mark.xfail)\n@case(add_test_cases())\ndef test__divide(a: int, b: int, expected: int) -\u003e None:\n    assert expected == a / b\n```\n\n# Features\n\n## Default Arguments Values\n```python\n@case(\"Check for Failure\", val=\"Failure\")\n@case(\"Check for success\", val=\"Success\", sanity=\"Success\")\ndef test__with_default(val: str, sanity: str = \"Failure\") -\u003e None:\n    assert sanity == val\n```\n\n## Generator Case\n```python\nfrom itertools import product\nfrom pytest_case import case\n\n@case(product(\n    (\"Chrome\", \"Firefox\", \"Safari\"), \n    (\"Windows\", \"macOS\", \"Linux\")\n))\ndef test__browser_os_compatibility(browser: str, operating_system: str) -\u003e None:\n    # Will generate cases:\n    # (\"Chrome\", \"Windows\"), (\"Chrome\", \"macOS\"), (\"Chrome\", \"Linux\"), (\"Firefox\", \"Windows\"), ...\n    pass\n```\n\n## Using Fixtures\n- Using pytest built-in `request` fixture.\n```python\ndef test__with_request_fixture(request: Any) -\u003e None:\n    fixture_value = request.getfixturevalue(\"fixture_name\")\n    ...\n``` \n- Using [pytest-lazy-fixtures](https://github.com/dev-petrov/pytest-lazy-fixtures)\n```python\nfrom pytest_case import case\nfrom pytest_lazy_fixtures import lf\n\n\n@case(\"Lazy Fixture Case\", lf(\"fixture_name\"))\ndef test__with_lf_cases(fixture_val: Any) -\u003e None\n    ...\n```\n\n# Project Roadmap:\nThese are the the predicted checkpoints for this project:\n\n- [x] **Test Arguments Default Values**\n    That would be cool!\n- [x] **Test Marks**\n    Marks that are currently supported by pytest, such as: xfail, skip, ...\n- [x] **Tests Cases Generators**\n    Provide a generator function to the `case` to automatically generate cases.\n- [x] **Use Fixtures**\n    Use fixtures in cases and tests\n- [ ] **Tests Samples Generation**\n    Generate parameters to catch edge-cases, based on restrictions or datasets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitanwass%2Fpytest-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feitanwass%2Fpytest-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitanwass%2Fpytest-case/lists"}