Releases: 15r10nk/inline-snapshot
Releases · 15r10nk/inline-snapshot
v0.14.0
Added
- command line shortcuts can be defined to simplify your workflows.
--review
and--fix
are defined by default. See the documentation for details.
Removed
- removed the
"Programming Language :: Python :: Implementation :: PyPy"
classifier which was incorrect, because inline-snapshot can not fix snapshots on pypy.
inline-snapshot now enforces--inline-snapshot=disable
when used with an implementation other than cpython, which allows it to be used in packages that want to support pypy.
Changed
--inline-snapshot=create/fix/trim/update
will no longer show reports for other categories.
You can use--inline-snapshot=create,report
if you want to use the old behaviour.
Full Changelog: v0.13.4...v0.14.0
v0.13.4
v0.13.3
v0.13.2
Changed
- star-expressions in list or dicts where never valid and cause a warning now.
other=[2] assert [5,2]==snapshot([5,*other])
Fixed
-
A snapshot which contains an dirty-equals expression can now be compared multiple times.
def test_something(): greeting = "hello" for name in ["alex", "bob"]: assert (name, greeting) == snapshot((IsString(), "hello"))
v0.13.1
What's Changed
- Use tomllib instead of PyPI toml on Python 3.11 and later by @musicinmybrain in #115
New Contributors
- @musicinmybrain made their first contribution in #115
Full Changelog: v0.13.0...v0.13.1
v0.13.0
The new prints
function allows you to snapshot the output of your code.
from inline_snapshot import snapshot
from inline_snapshot.extra import prints
import sys
def test_prints():
with prints(
stdout=snapshot("hello world\n"), stderr=snapshot("some error\n")
):
print("hello world")
print("some error", file=sys.stderr)
I started also a list of all third-party extensions
What's Changed
- feat: strings with one line-break at the end stay single-quoted strings by @15r10nk in #111
- feat: 3.13 support by @15r10nk in #110
- feat: added extra.prints by @15r10nk in #108
Full Changelog: v0.12.1...v0.13.0