Skip to content

v0.15.0

Compare
Choose a tag to compare
@15r10nk 15r10nk released this 10 Dec 07:18
· 38 commits to main since this release

Added

  • snapshots inside snapshots are now supported.

    assert get_schema() == snapshot(
        [
            {
                "name": "var_1",
                "type": snapshot("int") if version < 2 else snapshot("string"),
            }
        ]
    )
  • runtime values can now be part of snapshots.

    from inline_snapshot import snapshot, Is
    
    current_version = "1.5"
    assert request() == snapshot(
        {"data": "page data", "version": Is(current_version)}
    )
  • f-strings can now also be used within snapshots, but are currently not fixed by inline-snapshot.

Changed

  • dirty-equals expressions are now treated like runtime values or snapshots within snapshots and are not modified by inline-snapshot.

Fixed

  • inline-snapshot checks now if the given command line flags (--inline-snapshot=...) are valid

  • Example(...).run_pytest(raise=snapshot(...)) uses now the flags from the current run and not the flags from the Example.

Full Changelog: v0.14.2...v0.15.0