Skip to content

Commit

Permalink
Release Pynguin 0.13.0
Browse files Browse the repository at this point in the history
- Add an assertion-generation strategy based on mutation (thanks to
  @f-str).

  The new strategy is enabled by default (can be configured using the
  `--assertion-generation` parameter).  It uses a custom
  [fork](https://github.com/se2p/mutpy-pynguin) of the mutation-testing
  framework [MutPy](https://github.com/mutpy/mutpy), which mutates the
  subject under test and for each mutant traces the values of fields and
  returned by method calls.  If these values differ between mutant and
  original code, an assertion is generated based on the result on
  the original subject under test.  One can also control whether the
  strategy shall also generate assertions for unchanged values by the
  `--generate-all-assertions` flag.

  The release also updates the documentation accordingly.

  *Note:* This feature is an early prototype of such an assertion
  generation, which might cause unexpected behaviour.  You can switch
  back to the previous strategy for assertion generation by setting
  `--assertion-generation SIMPLE`.
  • Loading branch information
stephanlukasczyk committed Nov 5, 2021
1 parent e92fb7c commit d86d817
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ for the source-code artifacts of each version.

## Pynguin 0.13.0

- Add an assertion-generation strategy based on mutation (thanks to @f-str).

The new strategy is enabled by default (can be configured using the
`--assertion-generation` parameter). It uses a custom
[fork](https://github.com/se2p/mutpy-pynguin) of the mutation-testing framework
[MutPy](https://github.com/mutpy/mutpy), which mutates the subject under test and for
each mutant traces the values of fields and returned by method calls. If these values
differ between mutant and original code, an assertion is generated based on the result
on the original subject under test. One can also control whether the strategy shall
also generate assertions for unchanged values by the `--generate-all-assertions` flag.

The release also updates the documentation accordingly.

*Note:* This feature is an early prototype of such an assertion generation, which
might cause unexpected behaviour. You can switch back to the previous strategy for
assertion generation by setting `--assertion-generation SIMPLE`.

## Pynguin 0.12.0

- Generate more reasonable variable names in tests.
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ FROM python:3.9.7-slim-bullseye AS execute

# Set environment variables
# Set the Pynguin version
ENV PYNGUIN_VERSION "0.13.0.dev0"
ENV PYNGUIN_VERSION "0.13.0"
# Pynguin requires to set the variable to show it that the user is aware that running
# Pynguin executes third-party code, which could cause arbitrary harm to the system.
# By setting the variable, the user acknowledges that they are aware of this. In the
Expand Down
2 changes: 1 addition & 1 deletion pynguin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
StoppingCondition = config.StoppingCondition
TypeInferenceStrategy = config.TypeInferenceStrategy

__version__ = "0.13.0.dev"
__version__ = "0.13.0"
__all__ = [
"set_configuration",
"run_pynguin",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[tool.poetry]
name = "pynguin"
version = "0.13.0.dev"
version = "0.13.0"
description = "Pynguin is a tool for automated unit test generation for Python"
authors = ["Stephan Lukasczyk <[email protected]>"]
license = "LGPL-3.0-or-later"
Expand Down

0 comments on commit d86d817

Please sign in to comment.