cosmic-ray
Mutation testing
Decision gist · record as of 2026-08-14
Yes, if you want to move beyond line coverage and understand whether your tests actually catch bugs. Cosmic Ray is actively maintained, has low install friction, and uses a permissive MIT license. It's a specialized tool—not for every project—but essential for teams that need confidence in test quality. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later and a test runner (pytest, unittest, etc.) configured for your project.
- Low install friction with a pure Python wheel.
- Active maintenance with a recent release (5 days old) and steady repository activity.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-08-09 (5 days) · last repo commit 2026-08-09 · 648 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 362,484 downloads/mo, #7,231 on PyPI
Alternatives
Verify before relying
pip install cosmic-ray
from cosmic_ray.cli import main
# Then run: cosmic-ray exec --test-runner pytest your_module- Exact mutation types and transformations applied to source code
- Performance characteristics on large codebases or slow test suites
- Integration details with different test runners beyond pytest
What it is and what it does
Cosmic Ray is a mutation testing framework for Python that systematically modifies your source code—changing operators, literals, and control flow—then reruns your test suite to see if the tests catch the mutations. The goal is to measure how well your tests actually validate your code: if a mutation goes undetected, it reveals a gap in test coverage that a passing test count alone would hide.
You configure Cosmic Ray with your test runner and target modules, then let it generate and test mutations. It reports which mutations survived (your tests missed them) and which were killed (your tests caught them), giving you a mutation score that reflects test quality. The tool integrates with common Python testing frameworks and can be run from the command line or embedded in CI/CD pipelines.
Use it for
- Assess whether your test suite actually validates the code it claims to cover, beyond line coverage metrics.
- Identify weak spots in test logic where mutations slip through undetected.
- Measure test quality improvements over time as you refine your test suite.
- Validate test effectiveness before deploying critical code to production.
- Generate mutation scores for quality gates in continuous integration workflows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you want to move beyond line coverage and understand whether your tests actually catch bugs.
Cosmic Ray is actively maintained, has low install friction, and uses a permissive MIT license. It's a specialized tool—not for every project—but essential for teams that need confidence in test quality. No known security vulnerabilities.
Install
cosmic-ray on PyPI
Before you install
Low install friction with a pure Python wheel. Active maintenance with a recent release (5 days old) and steady repository activity. Supports Python 3.9 through 3.13.
Requires Python 3.9 or later and a test runner (pytest, unittest, etc.) configured for your project.
License in practice
MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install cosmic-ray
from cosmic_ray.cli import main
# Then run: cosmic-ray exec --test-runner pytest your_module
Verify before relying
- Exact mutation types and transformations applied to source code
- Performance characteristics on large codebases or slow test suites
- Integration details with different test runners beyond pytest
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 13 packagesaiohttpanybadgeattrsclickdecoratorexit-codesgitpythonparsorichsqlalchemystevedoretomlyattag |
| Maintenance | Actively maintained 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 362,484 / month, #7,231 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing |
Evidence: cosmic_ray-8.7.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mutation testing python”
- cosmic-rayCosmic Ray is a mutation testing tool that modifies your Python…
- mutmutMutmut is a mutation testing system for Python that automatically…
- graphene-file-uploadAdds file upload support to GraphQL mutations in Graphene-based…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mutmut · pytest-jira-xray · atheris · graphene-file-upload · varcode · pytest-race · pycarlo · hypothesis-graphql · pytest-rng · python-graphql-client