All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
.. program:: pytest-matcher
2.1.0 -- 2025-08-08
- Automate pattern editing (preparation) with the :py:func:`on_store` marker.
- Make the :py:data:`expected_out` printable.
- Updated the default value of :option:`pm-pattern-file-fmt` to append
{suffix}, which was missing despite being documented.
2.0.3 -- 2025-07-26
- Set the :option:`pm-patterns-base-dir` default to :file:`tests/data/expected` to align with the common :file:`tests/` directory layout.
- Improve documentation.
- Update the :file:`pyproject.toml` to suit the :program:`hatch test` command.
- Handle invalid values of the :option:`pm-pattern-file-fmt` option.
2.0.2 -- 2024-08-01
- BREAKING CHANGE Remove Python 3.9 from classifiers (ought to be done in 1.6.0).
- Little improvements in documentation.
2.0.1 -- 2024-03-15
- Quick check for the :file:`ChangeLog.rst`.
- The release GitHub workflow has been updated to use modern versions of the involved actions.
- Do not override the path suffix-like part (separated by a dot) with a pattern filename extension.
2.0.0 -- 2024-03-11
- Introduce :option:`pm-pattern-file-fmt` configuration parameter to give full control over the path to pattern files.
- A test can be marked with :py:func:`@pytest.mark.expect_suffix <expect_suffix>`
to have an arbitrary suffix in the pattern filenames.
The :option:`pm-pattern-file-fmt` format string should have the
{suffix}placeholder to make it work. See :issue:`22`. - Documentation.
- Introduce :option:`pm-mismatch-style`.
- Show newlines in the
fullmismatch mode.
- BREAKING CHANGE The expectation files path has never used the
<test-module-name>component despite the :file:`README.rst` claimed. Existing projects could set :option:`pm-pattern-file-fmt` to{class}/{fn}{callspec}to preserve backward compatibility.
- BREAKING CHANGE The :option:`!pm-pattern-file-use-system-name` configuration
parameter has been removed. Having
{suffix}in the :option:`pm-pattern-file-fmt` one can have a system name suffix whenever he needs it.
1.6.0 -- 2024-02-29
- :option:`--pm-reveal-unused-files` option to reveal unused pattern files.
- run test with :command:`pytest` 7.x and 8.x.
1.5.1 -- 2024-01-15
- Regression with Python less than 3.11.
1.5.0 -- 2024-01-11
- Make it possible to use :py:data:`expected_xxx <expected_out>` with parameterized tests. See :issue:`4`.
1.4.0 -- 2021-12-10
- Allow
assert expected_out.match(blah_blah) is True.
- Migrate to :file:`setup.py`-less build (using PEP 517 and PEP 660).
1.3.3 -- 2019-06-27
- Fix backward compatibility with Python less than 3.6.
1.3.2 -- 2019-06-26
- When a caller uses
re.MULTILINE, the plugin does not usesplitlines.
1.3.1 -- 2019-04-04
- Show actual and expected output on failed :py:func:`expected_out.match()`.
- Update code for the modern
pytest(4.4.0) andPyYAML(5.1).
1.2.1 -- 2018-03-30
- Update meta-data of the project for PyPi.
1.2.0 -- 2018-03-30
- Add an INI-file option :option:`!pm-pattern-file-use-system-name` to control if the system name suffix is expected to be in a pattern filename. For example, this allows patterns with different CR/LF conventions to be created.
- Add :py:data:`expected_yaml` fixture to match YAML files.
- Introduce unit tests.
1.1.0 -- 2018-03-28
- Use
pytest.skip()if no pattern file has been found or it contains an invalid regular expression; - Added doc-strings to the fixtures, so :command:`pytest --fixtures` would not complain.
- Ensure full pattern match for :py:func:`expected_xxx.match <expected_out.match>` named fixtures.
1.0.0 -- 2017-08-25
- Add a pretty printer for failed assertions with the :py:data:`expected_out` fixture and equal comparison operator.