Skip to content

Releases: 15r10nk/inline-snapshot

0.32.1

17 Feb 12:06

Choose a tag to compare

Fixed

  • Fixed handling of datetime and time objects with timezone information. The tzinfo parameter is now properly included in snapshots, and timezone.utc is represented with the correct import (from datetime import timezone).

  • Fixed customize hook registration to properly check if objects are functions before inspecting the inline_snapshot_impl attribute, preventing potential attribute errors when scanning conftest modules.

0.32.0 customize everything

13 Feb 20:16

Choose a tag to compare

0.32.0 — 2026-02-13

Added

  • pathlib.Path/PurePath values are now never stored as Posix/WindowsPath or their Pure variants, which improves the writing of platform independent tests.
  • Support for import statement generation for all types and user-customized code.
  • Added a new way to customize snapshot creation with @customize.
  • Added a plugin system which allows you to reuse customizations across multiple projects.
  • Added support for conditional external storage to automatically store values in external files based on custom criteria (e.g., string length, data size).
  • Added built-in handlers for datetime.datetime, date, time, and timedelta that generate clean snapshots with proper imports.
  • Generates __file__ instead of the filename string of the current source file.
  • Uses dirty-equals IsNow() instead of the current datetime when the time value equals the current time.

Removed

  • removed support for python 3.8 because it is end-of-life

Deprecated

  • Deprecated @customize_repr which can be replaced with @customize.

Fixed

  • raises catches BaseException instead of Exception. This ensures that SystemExit and KeyboardInterrupt are also caught.

  • pytest --color flag is now respected

0.31.1

07 Nov 07:36

Choose a tag to compare

Fixed

  • Format commands with pipelines (using |) now properly fail when any command in the pipeline returns a non-zero exit code (#320). Previously, only the last command's exit code was considered, which could allow formatting to succeed even when intermediate commands failed.

0.31.0

27 Oct 12:01

Choose a tag to compare

Changed

  • BREAKING CHANGE: An exception is now raised when you use external() in files that are not inside your tests/ directory (or any other directory that you can configure with tool.inline-snapshot.test-dir).

  • Users are now notified if they use the same UUID for multiple external snapshots, which can happen when copying one test as a template for a new test. The snapshots should be reset to an empty external() and recreated with inline-snapshot.

Fixed

  • Updated --snapshot flag to --inline-snapshot in session hints (#316).

  • The lookup for external snapshots has been improved (#292).

0.30.1

20 Oct 11:03

Choose a tag to compare

Fixed

  • Disable ensure ascii in json.dump to support non-ASCII characters in external files

0.30.0

15 Oct 06:01

Choose a tag to compare

Added

  • The test-dir config option can now also be a list of paths (#307)

  • added Python 3.14 support

0.29.4

13 Oct 07:40

Choose a tag to compare

Changed

  • External.run_inline() now uses the same logic as External.run_pytest.

Fixed

  • inline-snapshot now supports different Python file encodings and recognizes encoding comments such as # -*- coding: windows-1251 -*- (#305).

0.29.3

04 Oct 11:48

Choose a tag to compare

Fixed

  • xdist is now detected properly.

0.29.2

01 Oct 20:29

Choose a tag to compare

Fixed

  • fixed string formatting with black which caused invalid snapshots (#301)

    assert " a " == snapshot("a")

0.29.1

24 Sep 19:47

Choose a tag to compare

Changed

  • Example.run_inline can now be used with ["--inline-snapshot=disable"].

Fixed

  • --inline-snapshot=report now shows the same changes for external snapshots as --inline-snapshot=review (#298).
  • Fixed a crash when generating reports for external_file("some_non_existing_file.txt").