{"id":13772064,"url":"https://github.com/EvanKepner/mutatest","last_synced_at":"2025-05-11T04:31:08.185Z","repository":{"id":43738569,"uuid":"162820276","full_name":"EvanKepner/mutatest","owner":"EvanKepner","description":"Python mutation testing: test your tests! Safely run mutation trials without source code modifications and see what will get past your test suite.","archived":false,"fork":false,"pushed_at":"2023-02-17T12:23:43.000Z","size":795,"stargazers_count":97,"open_issues_count":5,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T15:21:38.312Z","etag":null,"topics":["mutation","mutation-testing","python3","python37","python38","unit-test"],"latest_commit_sha":null,"homepage":"https://mutatest.readthedocs.io/","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/EvanKepner.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","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":"AUTHORS.rst"}},"created_at":"2018-12-22T15:04:53.000Z","updated_at":"2025-04-05T08:52:42.000Z","dependencies_parsed_at":"2024-01-13T00:37:52.647Z","dependency_job_id":"9bc13477-92f6-4e8f-8a2b-c7faa70b4032","html_url":"https://github.com/EvanKepner/mutatest","commit_stats":{"total_commits":402,"total_committers":4,"mean_commits":100.5,"dds":0.03731343283582089,"last_synced_commit":"3a2d14536f49bd4e8511474cadecd47d2a0c2f3b"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanKepner%2Fmutatest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanKepner%2Fmutatest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanKepner%2Fmutatest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvanKepner%2Fmutatest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvanKepner","download_url":"https://codeload.github.com/EvanKepner/mutatest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"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":["mutation","mutation-testing","python3","python37","python38","unit-test"],"created_at":"2024-08-03T17:00:59.494Z","updated_at":"2025-05-11T04:31:07.492Z","avatar_url":"https://github.com/EvanKepner.png","language":"Python","readme":"``mutatest``: Python mutation testing\n==========================================\n\n|  |py-versions| |license| |ci-azure| |docs| |coverage| |black|\n|  |pypi-version| |pypi-status| |pypi-format| |pypi-downloads|\n|  |conda-version| |conda-recipe| |conda-platform| |conda-downloads|\n\n\nAre you confident in your tests? Try out ``mutatest`` and see if your tests will detect small\nmodifications (mutations) in the code. Surviving mutations represent subtle changes that are\nundetectable by your tests. These mutants are potential modifications in source code that continuous\nintegration checks would miss.\n\n\nFeatures\n---------\n\n    - Simple command line tool with `multiple configuration options \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html\u003e`_.\n    - Built on Python's Abstract Syntax Tree (AST) grammar to ensure `mutants are valid \u003chttps://mutatest.readthedocs.io/en/latest/mutants.html\u003e`_.\n    - `No source code modification \u003chttps://mutatest.readthedocs.io/en/latest/install.html#mutation-trial-process\u003e`_,\n      only the ``__pycache__`` is changed.\n    - Uses ``coverage`` to create `only meaningful mutants \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html#coverage-filtering\u003e`_.\n    - Built for efficiency with `multiple running modes \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html#selecting-a-running-mode\u003e`_\n      and `random sampling of mutation targets \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html#controlling-randomization-behavior-and-trial-number\u003e`_.\n    - Capable of running `parallel mutation trials \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html#parallelization\u003e`_\n      with multiprocessing on Python 3.8.\n    - Flexible enough to run on a `whole package \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html#auto-detected-package-structures\u003e`_\n      or a `single file \u003chttps://mutatest.readthedocs.io/en/latest/commandline.html#specifying-source-files-and-test-commands\u003e`_.\n    - Includes an `API for custom mutation controls \u003chttps://mutatest.readthedocs.io/en/latest/modules.html\u003e`_.\n    - Tested on Linux, Windows, and MacOS with `Azure pipelines \u003chttps://dev.azure.com/evankepner/mutatest/_build/latest?definitionId=1\u0026branchName=master\u003e`_.\n    - Full strict static type annotations throughout the source code and the API.\n\nInstall\n-------\n\nInstall from `PyPI \u003chttps://pypi.org/project/mutatest/\u003e`_:\n\n.. code-block:: bash\n\n    $ pip install mutatest\n\nInstall from `conda-forge \u003chttps://anaconda.org/conda-forge/mutatest\u003e`_:\n\n.. code-block:: bash\n\n    $ conda install -c conda-forge mutatest\n\n\nExample Output\n--------------\n\nThis is an output example running mutation trials against the\n`API Tutorial example folder \u003chttps://mutatest.readthedocs.io/en/latest/api_tutorial/api_tutorial.html\u003e`_\nexample folder.\n\n.. code-block:: bash\n\n    $ mutatest -s example/ -t \"pytest\" -r 314\n\n    Running clean trial\n    2 mutation targets found in example/a.py AST.\n    1 mutation targets found in example/b.py AST.\n    Setting random.seed to: 314\n    Total sample space size: 2\n    10 exceeds sample space, using full sample: 2.\n\n    Starting individual mutation trials!\n    Current target location: a.py, LocIndex(ast_class='BinOp', lineno=6, col_offset=11, op_type=\u003cclass '_ast.Add'\u003e)\n    Detected mutation at example/a.py: (6, 11)\n    Detected mutation at example/a.py: (6, 11)\n    Surviving mutation at example/a.py: (6, 11)\n    Break on survival: stopping further mutations at location.\n\n    Current target location: b.py, LocIndex(ast_class='CompareIs', lineno=6, col_offset=11, op_type=\u003cclass '_ast.Is'\u003e)\n    Detected mutation at example/b.py: (6, 11)\n    Running clean trial\n\n    Mutatest diagnostic summary\n    ===========================\n     - Source location: /home/user/Github/mutatest/docs/api_tutorial/example\n     - Test commands: ['pytest']\n     - Mode: s\n     - Excluded files: []\n     - N locations input: 10\n     - Random seed: 314\n\n    Random sample details\n    ---------------------\n     - Total locations mutated: 2\n     - Total locations identified: 2\n     - Location sample coverage: 100.00 %\n\n\n    Running time details\n    --------------------\n     - Clean trial 1 run time: 0:00:00.348999\n     - Clean trial 2 run time: 0:00:00.350213\n     - Mutation trials total run time: 0:00:01.389095\n\n    Trial Summary Report:\n\n    Overall mutation trial summary\n    ==============================\n     - DETECTED: 3\n     - SURVIVED: 1\n     - TOTAL RUNS: 4\n     - RUN DATETIME: 2019-10-17 16:57:08.645355\n\n    Detected mutations:\n\n    DETECTED\n    --------\n     - example/a.py: (l: 6, c: 11) - mutation from \u003cclass '_ast.Add'\u003e to \u003cclass '_ast.Sub'\u003e\n     - example/a.py: (l: 6, c: 11) - mutation from \u003cclass '_ast.Add'\u003e to \u003cclass '_ast.Mod'\u003e\n     - example/b.py: (l: 6, c: 11) - mutation from \u003cclass '_ast.Is'\u003e to \u003cclass '_ast.IsNot'\u003e\n\n    Surviving mutations:\n\n    SURVIVED\n    --------\n     - example/a.py: (l: 6, c: 11) - mutation from \u003cclass '_ast.Add'\u003e to \u003cclass '_ast.Mult'\u003e\n\n\nDocumentation\n-------------\n\nFor full documentation, including installation, CLI references, API references, and tutorials,\nplease see https://mutatest.readthedocs.io/en/latest/.\nThe project is hosted on PyPI at https://pypi.org/project/mutatest/.\n\n\nBugs/Requests\n-------------\n\nPlease use the `GitHub issue tracker \u003chttps://github.com/EvanKepner/mutatest/issues\u003e`_ to submit bugs\nor request features.\nSee the `Contributing Guidelines \u003chttps://mutatest.readthedocs.io/en/latest/contributing.html\u003e`_ if you\nare interested in submitting code in the form of pull requests.\n\nChangeLog\n---------\n\nConsult the `Changelog \u003chttps://mutatest.readthedocs.io/en/latest/changelog.html\u003e`_ page for fixes\nand enhancements of each version.\n\nLicense\n-------\n\nCopyright Evan Kepner 2018-2020.\n\nDistributed under the terms of the `MIT \u003chttps://github.com/pytest-dev/pytest/blob/master/LICENSE\u003e`_\nlicense, ``mutatest`` is free and open source software.\n\n.. |py-versions| image:: https://img.shields.io/pypi/pyversions/mutatest?color=green\n    :target: https://pypi.org/project/mutatest/\n    :alt: Python versions\n.. |license| image:: https://img.shields.io/pypi/l/mutatest.svg\n    :target: https://pypi.org/project/mutatest/\n    :alt: License\n.. |pypi-version| image:: https://badge.fury.io/py/mutatest.svg\n    :target: https://pypi.org/project/mutatest/\n    :alt: PyPI version\n.. |pypi-status| image:: https://img.shields.io/pypi/status/mutatest.svg\n    :target: https://pypi.org/project/mutatest/\n    :alt: PyPI status\n.. |pypi-format| image:: https://img.shields.io/pypi/format/mutatest.svg\n    :target: https://pypi.org/project/mutatest/\n    :alt: PyPI Format\n.. |pypi-downloads| image:: https://pepy.tech/badge/mutatest\n    :target: https://pepy.tech/project/mutatest\n    :alt: PyPI Downloads\n.. |ci-travis| image:: https://travis-ci.org/EvanKepner/mutatest.svg?branch=master\n    :target: https://travis-ci.org/EvanKepner/mutatest\n    :alt: TravisCI\n.. |ci-azure| image:: https://dev.azure.com/evankepner/mutatest/_apis/build/status/EvanKepner.mutatest?branchName=master\n    :target: https://dev.azure.com/evankepner/mutatest/_build/latest?definitionId=1\u0026branchName=master\n    :alt: Azure Pipelines\n.. |docs| image:: https://readthedocs.org/projects/mutatest/badge/?version=latest\n    :target: https://mutatest.readthedocs.io/en/latest/?badge=latest\n    :alt: RTD status\n.. |coverage| image:: https://codecov.io/gh/EvanKepner/mutatest/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/EvanKepner/mutatest\n    :alt: CodeCov\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Black\n.. |conda-recipe| image:: https://img.shields.io/badge/recipe-mutatest-green.svg\n    :target: https://anaconda.org/conda-forge/mutatest\n    :alt: Conda recipe\n.. |conda-version| image:: https://img.shields.io/conda/vn/conda-forge/mutatest.svg\n    :target: https://anaconda.org/conda-forge/mutatest\n    :alt: Conda version\n.. |conda-platform| image:: https://img.shields.io/conda/pn/conda-forge/mutatest.svg\n    :target: https://anaconda.org/conda-forge/mutatest\n    :alt: Conda platforms\n.. |conda-azure| image:: https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/mutatest-feedstock?branchName=master\n    :target: https://anaconda.org/conda-forge/mutatest\n    :alt: Conda azure status\n.. |conda-downloads| image:: https://img.shields.io/conda/dn/conda-forge/mutatest.svg\n    :target: https://anaconda.org/conda-forge/mutatest\n    :alt: Conda downloads\n","funding_links":[],"categories":["Mutation Testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEvanKepner%2Fmutatest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEvanKepner%2Fmutatest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEvanKepner%2Fmutatest/lists"}