{"id":16376502,"url":"https://github.com/marginalhours/pytest-involve","last_synced_at":"2025-09-07T01:40:54.375Z","repository":{"id":62584110,"uuid":"202985136","full_name":"marginalhours/pytest-involve","owner":"marginalhours","description":"A pytest plugin to run tests pertaining to a specific file or changeset","archived":false,"fork":false,"pushed_at":"2020-02-02T18:24:44.000Z","size":100,"stargazers_count":28,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-01T05:09:42.860Z","etag":null,"topics":["pytest","pytest-plugin","python3"],"latest_commit_sha":null,"homepage":null,"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/marginalhours.png","metadata":{"files":{"readme":"README.rst","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":"2019-08-18T09:43:08.000Z","updated_at":"2025-08-07T16:06:52.000Z","dependencies_parsed_at":"2022-11-03T22:17:01.800Z","dependency_job_id":null,"html_url":"https://github.com/marginalhours/pytest-involve","commit_stats":null,"previous_names":["misterkeefe/pytest-involve"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/marginalhours/pytest-involve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marginalhours%2Fpytest-involve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marginalhours%2Fpytest-involve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marginalhours%2Fpytest-involve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marginalhours%2Fpytest-involve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marginalhours","download_url":"https://codeload.github.com/marginalhours/pytest-involve/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marginalhours%2Fpytest-involve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273986609,"owners_count":25202704,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["pytest","pytest-plugin","python3"],"created_at":"2024-10-11T03:24:55.353Z","updated_at":"2025-09-07T01:40:54.307Z","avatar_url":"https://github.com/marginalhours.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============\npytest-involve\n==============\n\n.. image:: https://img.shields.io/pypi/v/pytest-involve.svg\n    :target: https://pypi.org/project/pytest-involve\n    :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-involve.svg\n    :target: https://pypi.org/project/pytest-involve\n    :alt: Python versions\n\n.. image:: https://travis-ci.org/MisterKeefe/pytest-involve.svg?branch=master\n    :target: https://travis-ci.org/MisterKeefe/pytest-involve\n    :alt: See Build Status on Travis CI\n\n``pytest-involve`` is a ``pytest`` plugin for running only tests which cover a given file\nor set of files. It's called ``pytest-involve`` because it lets you run only tests involving\nmodules or members from those modules.\n\nUsually with ``pytest`` the test set to run is specified and coverage collected based on that set. When ``pytest-involve``\nis used, instead you specify the file(s) you want to cover, and test files are selected based\non whether they import from those file(s) or not.\n\nUsages\n------\n\n``pytest-involve`` adds one command line argument to ``pytest``, namely ``--involving``.\nThis can be provided a file path, a module import path (such as you would use in a\nPython interpreter), or either of the above suffixed with ``::`` and the name of something defined in there:\n\n``pytest --involving ./path/to/file.py``\n\n``pytest --involving importable.module.path``\n\n``pytest --involving ./path/to/file.py::member``\n\n``pytest --involving importable.module.path::member``\n\nThis will have the effect of only collecting and running tests which are defined in modules\nwhose imports overlap with the file(s) and member(s) specified with the ``--involving`` flag.\n\nThe plugin aims for recall over precision: It might run a few tests that\naren't strictly necessary, but it shouldn't ignore any tests that are.\n\nThe ``::member`` syntax will only work for things with a ``__file__`` attribute\n(so, mostly classes and functions).\n\n``pytest-involve`` should play nicely with most other ``pytest`` plugins and command line tooling.\nOne useful example is as follows:\n\n``git status -s | cut -c4- | grep .py | sed \"s/^/--involving /\" | xargs pytest``\n\nThis will take all ``*.py`` files mentioned in the output of ``git status`` and provide them\nto ``pytest`` prefixed with ``--involving``, which allows for quickly running unit tests\nrelevant to the current state of the repository.\n\n----\n\nThis `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `cookiecutter-pytest-plugin`_ template.\n\n\nFeatures\n--------\n\n* Run unit tests covering specific file(s) via the command line flag ``--involving``\n\nRequirements\n------------\n\n* ``pytest``\n* That's it.\n\nInstallation\n------------\n\nYou can install \"pytest-involve\" via `pip`_ from `PyPI`_::\n\n    $ pip install pytest-involve\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-involve\" is free and open source software.\n\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`: https://github.com/MisterKeefe/pytest-involve/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.org/project/pip/\n.. _`PyPI`: https://pypi.org/project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarginalhours%2Fpytest-involve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarginalhours%2Fpytest-involve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarginalhours%2Fpytest-involve/lists"}