Skip to content

Latest commit

 

History

History
694 lines (321 loc) · 30.9 KB

CHANGELOG.md

File metadata and controls

694 lines (321 loc) · 30.9 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog.

From v1.0.0 onwards, this project adheres to Semantic Versioning. Pre-v1, breaking changes are indicated via a minor release, while all other changes fall under patches. At any time, you can see what's in progress for a version by filtering GitHub issues by milestone.

4.6.0 (2023-10-24)

Features

  • serializer: add support for FunctionType serialization (#823) (f3a454a)

4.5.0 (2023-09-01)

Features

4.4.0 (2023-08-29)

Features

4.3.0 (2023-08-28)

Features

  • add include option to snapshots, similar to exclude (#797) (d3f891e)

4.2.2 (2023-08-28)

Bug Fixes

4.2.1 (2023-08-21)

Bug Fixes

4.2.0 (2023-08-21)

Features

  • serializer: add snapshot regex value matcher and bypass custom repr helper (#791) (3ac2ce8)

4.1.1 (2023-08-17)

Bug Fixes

  • preserve Falsy values in assertion diff function (#789) (118ef92)

4.1.0 (2023-08-16)

Features

  • amber: expose serialize_custom_iterable method of AmberDataSerializer (#788) (d210cf1)

4.0.8 (2023-07-20)

Bug Fixes

  • diffing excessively large snapshot lines (#778) (64b4265)

4.0.7 (2023-07-20)

Bug Fixes

4.0.6 (2023-07-11)

Bug Fixes

4.0.5 (2023-07-04)

Bug Fixes

4.0.4 (2023-06-19)

Bug Fixes

  • incorrect marking of TestClass.test_method as unused, close #717 (#761) (0badfdb)

4.0.3 (2023-06-19)

Bug Fixes

4.0.2 (2023-04-25)

Bug Fixes

4.0.1 (2023-02-21)

Bug Fixes

  • serializer: handling of multi-part file extensions in SingleFileExtension (#710) (efe687e)

4.0.0 (2023-02-02)

Bug Fixes

  • defer snapshot writes until end of session (#606) (68f1d5f)
  • ensure all pytest options are serializable (#667) (e8ed9f2)
  • improve pytest-xdist compatibility (9b9090f)
  • lru_cache on snapshot reads (#629) (c1a675f)
  • remove legacy path usage to support no:legacypath, closes #677 (#684) (6385979)

Code Refactoring

  • simplify data serializer for ambr (#676) (3d296e1)
  • write performance improvements, api clarity (#645) (2c31c39)

Features

  • json: serialize None as null, close #622 (c330680)
  • numerically sort snapshots if possible, close #657 (4ca0716)
  • serializer: preserve key ordering of OrderedDict (0a2289a)
  • support overriding the amber serializer class (#683) (662c93f)
  • update python version, pytest version (#658) (c360b95)

BREAKING CHANGES

  • Serializers may now throw a TaintedSnapshotError which will tell the user to regenerate the snapshot even if the underlying data has not changed. This is to support rolling out more subtle changes to the serializers, such as the introduction of serializer metadata.

  • Renamed DataSerializer to AmberDataSerializer.

  • serializer: Key order is now preserved if using OrderedDict in both the Amber serializer and JSON serializer.

  • json: The JSONSnapshotExtension now serializes Python's None as "null" rather than "None".

  • Raise minimum python version to 3.8.1 and min. pytest version to v7.

  • PyTestLocation.filename has been renamed to .basename

  • refactor: add test_location kwarg to get_snapshot_name

  • refactor: get_snapshot_name is now static as a classmethod

  • refactor: remove pre and post read/write hooks

  • Pre and post read/write hooks have been removed without replacement to make internal refactor simpler. Please open a GitHub issue if you have a use case for these hooks.

  • refactor: rename Fossil to Collection

  • The term 'fossil' has been replaced by the clearer term 'collection'.

  • refactor: pass test_location to read_snapshot

  • refactor: remove singular write_snapshot method

  • refactor: dirname property to method

  • refactor: pass test_location to discover_snapshots

  • refactor: remove usage of self.test_location

  • refactor: make write_snapshot a classmethod

  • refactor: do not instantiate extension with test_location

  • Numerous instance methods have been refactored as classmethods.

3.0.6 (2022-12-30)

Bug Fixes

  • ensure all pytest options are serializable (#667) (e320d7b)
  • improve pytest-xdist compatibility (8739194)

3.0.5 (2022-11-08)

Bug Fixes

  • only instantiate colored objects if color is not disabled (#634) (7f0fe22)

3.0.4 (2022-11-03)

Bug Fixes

3.0.3 (2022-11-03)

Bug Fixes

  • use more expressive glob when building whl (#627) (6a766e7)

3.0.2 (2022-09-23)

Bug Fixes

  • update classifiers (no material change) (43d78ec)

3.0.1 (2022-09-23)

Bug Fixes

  • avoid reporting crash for snapshot dir outside pytest dir (#621) (f2b2e77)

3.0.0 (2022-08-11)

Features

BREAKING CHANGES

  • Drop Python 3.6 support due to end of life.

2.3.1 (2022-07-07)

Bug Fixes

  • ignore test_a_suffix snapshots when running test_a (#607) (988a8ab)

2.3.0 (2022-05-12)

Features

2.2.0 (2022-05-12)

Features

2.1.0 (2022-05-11)

Features

2.0.0 (2022-04-10)

Features

BREAKING CHANGES

  • amber: update to serialization requires regeneration of snapshots

Migration Guide

  • pytest --snapshot-update to regenerate amber snapshots

1.7.4 (2022-02-16)

Bug Fixes

1.7.3 (2022-01-25)

Bug Fixes

  • json: use additional forward references for py3.7 (#587) (8489e93)

1.7.2 (2022-01-25)

Bug Fixes

  • json: use forward references for py3.7 compatibility (#586) (8f0db02)

1.7.1 (2022-01-25)

Bug Fixes

1.7.0 (2022-01-14)

Bug Fixes

  • ignore, this commit is to force a release (effeadb)

Features

  • add JSON extension as alternative to amber (b366082)

1.6.0 (2022-01-14)

Features

  • allow extensions to override snapshot equality check (#548) (a44f1b9)

1.5.0 (2021-11-03)

Features

1.4.7 (2021-10-13)

Bug Fixes

  • NameError when importing SingleFileSnapshotExtension (#557) (935e256)

1.4.6 (2021-10-06)

Bug Fixes

  • typo in single file extension error message (#553) (c4785f8)

1.4.5 (2021-08-29)

Bug Fixes

1.4.4 (2021-08-20)

Performance Improvements

  • memoise DataSerializer.read_file results (#543) (df5b516)

1.4.3 (2021-08-20)

Performance Improvements

  • cache session snapshot extension discovery (#542) (10cfc90)

1.4.2 (2021-08-18)

Performance Improvements

  • discover snapshots once per file rather than per assertion (#541) (84c8b82)

1.4.1 (2021-08-18)

Bug Fixes

  • unused snapshot not filtered out when tests have similar names, close #529 (#531) (d0c8ca8)

1.4.0 (2021-08-02)

Features

1.3.1 (2021-06-20)

Bug Fixes

1.3.0 (2021-06-05)

Features

  • types: explicit property matcher and filter types kwargs (#515) (8dddebf)

1.2.4 (2021-06-01)

Bug Fixes

  • correctly use pytest invocation arguments (#507) (8b511e5)

1.2.3 (2021-05-12)

Bug Fixes

1.2.2 (2021-03-18)

Features

  • option to report details of unused snapshots (#467), close #465 (1c50db0)

1.1.0 (2020-12-01)

Features

  • add PEP-561 py.typed file for downstream type checkers (#440) (fe15bdb), closes #439

1.0.0 (2020-11-13)

Features

BREAKING CHANGES

  • Release v1.0.0

0.9.0 (2020-11-13)

Features

  • expand single filename legal characters (#398) (302916b)

0.8.4 (2020-10-30)

Performance Improvements

  • optimise session items data structures (#403) (818d405)

0.8.3 (2020-10-30)

Bug Fixes

  • assertion exception shows error at correct location (#402) (d46bba4)
  • only perform session finish on test items ran (#401) (61a670f)

0.8.2 (2020-10-30)

Bug Fixes

  • unused snapshot detection for targeting single parameterized test case (#394) (e008935)

0.8.1 (2020-10-29)

Bug Fixes

0.8.0 (2020-10-27)

Features

  • amber: normalise line endings between operating systems (#377) (82b624d)

BREAKING CHANGES

  • Line control characters are normalised when snapshots are generated i.e. \r and \n characters are all written as \n. This is to allow interoperability of snapshots between operating systems that use disparate line control characters.

0.7.2 (2020-09-20)

Bug Fixes

0.7.1 (2020-09-05)

Bug Fixes

0.7.0 (2020-08-24)

Features

0.6.1 (2020-07-29)

Bug Fixes

0.6.0 (2020-07-12)

Features

0.5.2 (2020-07-09)

Bug Fixes

  • amber: Do not add empty line to empty iterables (#287) (0b4a9b0)

0.5.1 (2020-06-12)

Bug Fixes

  • support ignoring fields when serializing (#262) (f67268e)

0.5.0 (2020-06-09)

Features

0.4.4 (2020-06-02)

Bug Fixes

0.4.3 (2020-05-27)

Bug Fixes

  • Update setup.py, so that it allows for any Python 3.6+ version to be used (25c2688)

0.4.2 (2020-04-22)

Bug Fixes

  • Handle dotted parameters in classname (#200) (d961f7c)

0.4.1 (2020-04-19)

Bug Fixes

  • specify encoding when reading and writing amber fossils (#198) (a6a53c4)

0.4.0 (2020-04-19)

Bug Fixes

  • remove added trailing whitespace from multiline string (24f3d57)

Features

0.3.12 (2020-04-19)

Bug Fixes

  • use the test node location when determining snapshot class name (#197) (1010c94)

0.3.11 (2020-04-17)

Bug Fixes

  • show snapshot data in report when does not exist (#191) (7ebdca2)

0.3.10 (2020-04-15)

Bug Fixes

0.3.9 (2020-04-08)

Bug Fixes

  • correctly track unused snapshots in classes (#177) (f780501)

0.3.8 (2020-04-03)

Performance Improvements

  • only clear assertion _extension when overridden (#172) (82eae91)

0.3.7 (2020-03-24)

Bug Fixes

  • support call syntax for snapshot fixture overriding (#160) (4cf051c)

0.3.6 (2020-03-10)

Bug Fixes

  • specify correct min version of pytest (#157) (858bec7)

0.3.5 (2020-03-08)

Bug Fixes

  • snapshot name warning showing on false negatives (#151) (d56860b)

0.3.4 (2020-03-08)

Bug Fixes

  • show hidden line characters and accessible colors (#126) (fa442df), closes #150
  • Conversion of all os.path and os.walk calls to use pathlib instead, setting pathlib as the new preferred way of doing path operations (#130)
  • Add --snapshot-default-extension option to specify extension class via pytest cli (#132)
  • Fix bug where snapshot diffs were erroneously printed (#135)
  • Fix bug where snapshot names were incorrectly matching tests (#136)
  • Fix bug where deleted snapshots where incorrectly colored (#136)
  • Fix bug where targeting specific test nodes did not filter out unused snapshots (#139)
  • Fix bug where snapshot report was printed out before the pytest report (#144)
  • Fix bug where untargeted snapshots would be deleted when using pytest in targeted mode (#123)
  • Fix bug where snapshot files were not cleaned up when running specific test files (#127)
  • Fix bug where targeting specific test nodes in a test file was not supported (#127)
  • Fix bug where targeting specific test modules using pyargs was not supported (#127)
  • Fix bug where newline control characters were being translated based on platform (#113)
  • Adds support for named tuple fields (#108)
  • Add trailing commas to class fields (#108)
  • Specify explicit version range for pytest peer dependency (#111)
  • Fix issue with using hashables as dict keys or in sets (#103)
  • Add support for custom objects repr (#101)
  • Add support for nested test classes (#99)
  • Remove _snapshot_subdirectory_name from SnapshotFossilizer (#99)