Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

The python3 bytecode based mutation analysis framework

Project description

This package provides a byte-code based mutation analysis framework for Python. It computes the mutation score (The quality score) of your doctests. Bytecode based mutation analysis ensures that invalid mutants are completely avoided (unlike source code based mutants), and also that trivial redundant and equivalent mutants (that can be distinguished by compiler) are already removed. It uses coverage analysis to ensure that only covered mutants that have a chance to be detected are run. It also includes randomized evaluation of equivalent mutants (use -a to set the number of attempts to be made).

Compatibility
-------------
It was tested on Python 3.6


To run
------

python xmutant.py -a <attempts> <module to be tested>

Mutation Operators (on bytecode)
--------------------------------

- modify constants
- replace boolean comparators (< <= == != > >=)
- replace arithmetic operators (+ - * / // ./. ** % << >> ^)
- remove unary negation and invert
- invert unary signs
- swap 'and' and 'or' in boolean expressions
- swap inplace 'and' and 'or' in assignments
- swap 'jump if * or pop' and 'jump if * and pop'
- swap 'pop if true' and 'pop if false'

Project details


Release history Release notifications

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
xmutant-0.3.tar.gz (13.0 kB) Copy SHA256 hash SHA256 Source None Dec 11, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page