{"id":17754839,"url":"https://github.com/sponja23/pytest-git-diff","last_synced_at":"2026-03-07T16:03:23.521Z","repository":{"id":230511721,"uuid":"770205326","full_name":"sponja23/pytest-git-diff","owner":"sponja23","description":"Pytest plugin that allows the user to select the tests affected by a range of git commits","archived":false,"fork":false,"pushed_at":"2024-08-30T10:16:19.000Z","size":122,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-08T05:44:48.171Z","etag":null,"topics":["pytest-plugin","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/sponja23.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-03-11T06:10:36.000Z","updated_at":"2024-05-29T17:15:00.000Z","dependencies_parsed_at":"2024-10-26T16:02:45.708Z","dependency_job_id":"2e652845-3083-4628-b125-0faed31de71b","html_url":"https://github.com/sponja23/pytest-git-diff","commit_stats":null,"previous_names":["sponja23/pytest-git-diff"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sponja23%2Fpytest-git-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sponja23%2Fpytest-git-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sponja23%2Fpytest-git-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sponja23%2Fpytest-git-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sponja23","download_url":"https://codeload.github.com/sponja23/pytest-git-diff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222728944,"owners_count":17029698,"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":["pytest-plugin","testing"],"created_at":"2024-10-26T14:22:43.144Z","updated_at":"2026-03-07T16:03:18.501Z","avatar_url":"https://github.com/sponja23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytest-git-diff\n\n![Test Workflow Status](https://img.shields.io/github/actions/workflow/status/sponja23/pytest-git-diff/testing.yml)\n![PyPI Version](https://img.shields.io/pypi/v/pytest-git-diff)\n\nPytest plugin that allows the user to select the tests *affected* by a given range of git commits. A file is considered affected when:\n- It was added/modified in between the commits.\n- It imports another affected file.\n\n## Installation\n\n```bash\npip install pytest-git-diff\n```\n\n## Usage\n\nThis plugin adds 2 options to the `pytest` CLI:\n- `--only-affected-by`: filters the collected tests, keeping only those affected by the given commit range. This range should be in the format `FROM_REV..TO_REV`. If `TO_REV` is omitted, it defaults to 'HEAD'.\n- `--only-affected-last-commit`: has the same effect as `--only-affected-by=HEAD~1..HEAD`.\n\n## Limitations\n\nThe main limitation in this plugin is that file paths must be valid Python identifier names (in particular, they can't contain dashes). That applies to every part of the path up to the working directory in which `pytest` was invoked.\n\nThis issue stems from a problem in the `pydeps` dependency. See https://github.com/thebjorn/pydeps/issues/24.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsponja23%2Fpytest-git-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsponja23%2Fpytest-git-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsponja23%2Fpytest-git-diff/lists"}