Changelog¶
Stable Releases¶
3.1.0¶
Maintenance patches and API changes to skip/only category selection.
3.0.2¶
Maintenance patch #27 updating source code conditional logic in the CLI argument parsing.
Minor fixes for the most updated CI checks.
3.0.1¶
Bug fix #24 where the bit-shift operators where not being applied during mutation trials and raised
KeyError.A new
test_all_op_types.pyensures all mutation substitutions work as intended.
3.0.0¶
Mutatesthas reached a level of maturity to warrant a stable release. With the addition of the multiprocessing capabilities, support forcoverageversions 4.x and 5.x, support for Python 3.7 and 3.8, being installable throughpiporconda, and with Azure Pipelines CI for platform tests, the tool and API are unlikely to change in a major way without moving to4.0.0.New in this release:
- Multiprocessing support on Python 3.8!
The new
--parallelcommand argument will instructmutatestto use multiprocessing for mutation trials. See the documentation for complete details.Bug fix in
mutatest.cache.create_cache_dirs()where the cache directory did not include “parents” in case of packages with nested directories without existing pycache.Removal of the
srsubcategory of slice mutations (Slice_RCfor range changes). These were rare, and supporting both Python 3.7 and 3.8 required excessive complexity. Thesucategory remains valid as the primary slice mutation set.
Beta Releases¶
2.2.0¶
Added support for specifying settings in
setup.cfgusing either[mutatest]or[tool:mutatest]sections in addition to themutatest.inifile.
2.1.3¶
Addressing test issues on Windows platform in the coverage tests by adding a
resolve_sourceflag to theCoverageFilter.filtermethod.
2.1.2¶
Moved the
testsdirectory to be within the package ofmutatest. This enabled the installation to be tested withpytest --pyargs mutatestas well aspytestfrom local source files. Test dependencies are still installed withpip install .[tests].
2.1.1¶
Includes specific test environments for
coverageversions 4 and 5 with appropriate mocked.coveragedata outputs (JSON or SQL based on version).A new
toxtest environment calledcov4is added, with a newpytestmarkerpytest.mark.coveragefor test selection.
2.1.0¶
Coverageversion 5.0 has moved to a SQLite database instead of a flat file. To support both 4x and 5x versions ofCoveragethefilterssource code has been updated. The test suite includes mocked coverage data parsing tests of 4x only for now.
2.0.1¶
Explicit including of
typing-extensionsinsetup.pyrequirements to fix breaking documentation builds on Python version 3.7 vs. 3.8.
2.0.0¶
Python 3.8 support! There are breaking changes with the
LocIndexand other components of thetransformersfrom prior versions ofmutatest. Python 3.8 introduces a new AST structure - including additional node attributesend_linenoandend_col_offsetthat have to be accounted for.transformers.MutateASTis now build from a base class and a mixin class depending on the Python version (3.7 vs. 3.8) for the appropriate AST treatment. There are no changes in the CLI usage.
1.2.1¶
Bugfix to ensure
excludepath processing inGenomeGroup.add_folderalways uses full resolved paths for files.
1.2.0¶
Feature #18: Allow mutation trials to time out. There are cases where a mutation could cause an infinite loop, such as changing the comparator in a
whilestatement e.g.,while x < 5becomeswhile x >= 5. A new--timeout_factorargument is added to set a cap on the maximum trial time as a multiplier of the clean-trial run.Bugfix on using
excludewhere files were logged but still becoming part of the sample.
1.1.1¶
Bug Fix #15: Fix
LocIndex.ast_classsetting forIndexnode mutations.
1.1.0¶
Add support for a
mutatest.iniconfiguration file for command line arguments.
1.0.1¶
Documentation updates, including the API tutorial.
Fix on latest
mypyerrors related tostrictprocessing ofrunandcache.
1.0.0¶
Moving from the alpha to the beta version with an API design. The alpha releases were focused on defining the functionality of the CLI. In the beta version, the CLI remains unchanged; however, a full internal design has been applied to create a coherent API. The
controller,optimizers, andmakermodules have been fully replaced byrun,api, andfilters. See the new full API documentation for details on using these modules outside of the CLI.Additionally,
pytestwas removed from the installation requirements since it is assumed for the default running modes but not required for the API or installation.
Alpha Releases¶
0.9.2¶
Added
--exceptionand-xas a survivor tolerance to raise an exception after the trial completes if the count of surviving mutants is greater than or equal to the specified value.
0.9.1¶
Added
--onlyand--skipwith category codes for mutation families.Provides CLI selection of mutation types to be used during the trials.
0.9.0¶
- Added new
Ifmutation:
Original statements are represented by
If_Statementand mutated to be eitherIf_Truewhere the statement always passes, orIf_Falsewhere the statement is never passed.
0.8.0¶
- Breaking changes to the CLI arguments and new defaults:
Output files are now optional, the default behavior has changed from always writing an RST file using the
-ooption on the command line.Exclusions are still marked as
-e; however, now multiple-earguments are supported and arguments must point to a Python file. The argument used to be:mutatest -e "__init__.py _devtools.py"and now it ismutatest -e src/__init__.py -e src/_devtools.py. There are no longer default exclusions applied.Improved CLI reporting, including selected test counts and line/col locations for trial results while processing.
0.7.1¶
Internal changes to
Slicemutations for clearer categorization and report output.Includes clearing names to
Slice_SwapandSlice_RangeChangefor categories.Updates operation names to
Slice_Unbounded...with “lower” or “upper”.
0.7.0¶
- Added new slice mutations:
Slice_SwapNoneULandSlice_SwapNoneLUfor swapping the upper and lower bound values when only one is specified e.g.x[1:]tox[:1].
Slice_UPosToZeroandSlice_UNegToZerofor moving the upper bound of a slice by 1 unit e.g.x[1:5]becomesx[1:4].
0.6.1¶
Added explicit tests for
argparsecli options.Added mechanism to sort reporting mutations by source file, then line number, then column number.
0.6.0¶
Including
pytestin the installation requirements. Technically, any test runner can be used but with all base package assumptions being built aroundpytestthis feels like the right assumption to call out as an install dependency. It is the default behavior.Updated
controllerfor test file exclusion to explicitly match prefix or suffix cases for"test_"and"_test"perpytestconventions.Changed error and unknown status results to console color as yellow instead of red.
Added multiple invariant property tests, primarily to
controllerandcache.Added
hypothesisto the test components ofextras_require.Moved to
@propertydecorators for internal class properties that should only be set at initialization, may add customsettersat a later time.Fixed a zero-division bug in the
cliwhen reporting coverage percentage.
0.5.0¶
Addition of
optimizers, including the new classCoverageOptimizer.This optimizer restricts the full sample space only to source locations that are marked as covered in the
.coveragefile. If you have apytest.inithat includes the--cov=command it will automatically generate during the clean-trial run.
0.4.2¶
More behind the scenes maintenance: updated debug level logging to include source file names and line numbers for all visit operations and separated colorized output to a new function.
0.4.1¶
Updated the reporting functions to return colorized display results to CLI.
0.4.0¶
- Added new mutation support for:
AugAssignin AST e.g.+= -= *= /=.
Indexsubstitution in lists e.g. take a positive number likei[1]and mutate to zero and a negative number e.g.i[-1] i[0].Added a
descattribute totransformers.MutationOpSetthat is used in the cli help display.Updated the cli help display to show the description and valid members.
0.3.0¶
Added new mutation support for
NameConstantin AST.This includes substitutions for singleton assignments such as:
True,False, andNone.This is the first non-type mutation and required adding a
readonlyparameter to thetransformers.MutateASTclass. Additionally, the type-hints for theLocIndexandMutationOpSetwere updated toAnyto support the mixed types. This was more flexible than a series ofoverloadsignatures.
0.2.0¶
- Added new compare mutation support for:
Compare Ismutations e.g.is, is not.
Compare Inmutations e.g.in, not in.
0.1.0¶
Initial release!
Requires Python 3.7 due to the
importlibinternal references for manipulating cache.Run mutation tests using the
mutatestcommand line interface.Supported operations:
BinOpmutations e.g.+ - / *including bit-operations.
Comparemutations e.g.== >= < <= !=.
BoolOpmutations e.g.and or.