17
0

4 Commits

Author SHA256 Message Date
4c2a0910d9 Accepting request 1321489 from devel:languages:python
- Only require pytest-subtests with pytest < 9.

OBS-URL: https://build.opensuse.org/request/show/1321489
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-inline-snapshot?expand=0&rev=7
2025-12-09 11:46:26 +00:00
116f62a24b - Only require pytest-subtests with pytest < 9.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-inline-snapshot?expand=0&rev=17
2025-12-08 04:31:44 +00:00
265a195cdb Accepting request 1308081 from devel:languages:python
- Update to 0.29.1:
  * Added
    + Added get_snapshot_value()
    + Added inline_snapshot.extra.Transformed and
      inline_snapshot.extra.transformation which can be used to transform
      values inside of snapshots.
    + exposed `@declare_unmanaged` which allows you to create your own
      unmanaged types.
    + New `external()` implementation with support for different data
      formats.
    + Ability to declare custom external formats with @register_format.
    + external() can now be used without snapshot().
    + Add/fix reproducible standard repr for functions
  * Changed
    + You now have to specify test-dir in your pyproject.toml when you save
      your tests in a folder other than `tests/` in your project root.
    + **BREAKING CHANGE**: You now have to declare format aliases if you used
      outsource() with a different suffix than .txt or .bin in the past.
    + Added extra information to the reported failure when snapshots are
      fixed or created.
  * Fixed
    + handle cases where pytest_unconfigure is called but not
      pytest_configure
    + pyproject.toml is now also located based on the current directory and
      the pytest-root.
    + Terminal with is preserved.
    + solved incompatibility with pytest_pretty.
    + external_file() now follows the aliases defined by
      register_format_alias().
    + fixed the representation of empty strings in sub-snapshots from

OBS-URL: https://build.opensuse.org/request/show/1308081
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-inline-snapshot?expand=0&rev=6
2025-09-30 15:48:37 +00:00
f6ef72620e - Update to 0.29.1:
* Added
    + Added get_snapshot_value()
    + Added inline_snapshot.extra.Transformed and
      inline_snapshot.extra.transformation which can be used to transform
      values inside of snapshots.
    + exposed `@declare_unmanaged` which allows you to create your own
      unmanaged types.
    + New `external()` implementation with support for different data
      formats.
    + Ability to declare custom external formats with @register_format.
    + external() can now be used without snapshot().
    + Add/fix reproducible standard repr for functions
  * Changed
    + You now have to specify test-dir in your pyproject.toml when you save
      your tests in a folder other than `tests/` in your project root.
    + **BREAKING CHANGE**: You now have to declare format aliases if you used
      outsource() with a different suffix than .txt or .bin in the past.
    + Added extra information to the reported failure when snapshots are
      fixed or created.
  * Fixed
    + handle cases where pytest_unconfigure is called but not
      pytest_configure
    + pyproject.toml is now also located based on the current directory and
      the pytest-root.
    + Terminal with is preserved.
    + solved incompatibility with pytest_pretty.
    + external_file() now follows the aliases defined by
      register_format_alias().
    + fixed the representation of empty strings in sub-snapshots from

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-inline-snapshot?expand=0&rev=15
2025-09-30 04:33:45 +00:00
5 changed files with 53 additions and 33 deletions

Binary file not shown.

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:17e73cb6864fa067aa94c2c1f290bbdeb25b2b807c4bdf53eee39a144f92a5a7
size 350236

View File

@@ -1,24 +0,0 @@
From 1040f3f5db5ddaf64d4178d9dd4cc53027316812 Mon Sep 17 00:00:00 2001
From: MeggyCal <MeggyCal@users.noreply.github.com>
Date: Tue, 27 May 2025 15:20:41 +0200
Subject: [PATCH] also accept ImportError
---
src/inline_snapshot/pytest_plugin.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/inline_snapshot/pytest_plugin.py b/src/inline_snapshot/pytest_plugin.py
index c6589997..d5d54dbc 100644
--- a/src/inline_snapshot/pytest_plugin.py
+++ b/src/inline_snapshot/pytest_plugin.py
@@ -37,8 +37,8 @@
# fixes #186
try:
import readline # noqa
- except ModuleNotFoundError: # pragma: no cover
- # should fix #189
+ except (ImportError, ModuleNotFoundError): # pragma: no cover
+ # should fix #189 and #245
pass

View File

@@ -1,3 +1,47 @@
-------------------------------------------------------------------
Mon Dec 8 04:29:16 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Only require pytest-subtests with pytest < 9.
-------------------------------------------------------------------
Tue Sep 30 04:27:54 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.29.1:
* Added
+ Added get_snapshot_value()
+ Added inline_snapshot.extra.Transformed and
inline_snapshot.extra.transformation which can be used to transform
values inside of snapshots.
+ exposed `@declare_unmanaged` which allows you to create your own
unmanaged types.
+ New `external()` implementation with support for different data
formats.
+ Ability to declare custom external formats with @register_format.
+ external() can now be used without snapshot().
+ Add/fix reproducible standard repr for functions
* Changed
+ You now have to specify test-dir in your pyproject.toml when you save
your tests in a folder other than `tests/` in your project root.
+ **BREAKING CHANGE**: You now have to declare format aliases if you used
outsource() with a different suffix than .txt or .bin in the past.
+ Added extra information to the reported failure when snapshots are
fixed or created.
* Fixed
+ handle cases where pytest_unconfigure is called but not
pytest_configure
+ pyproject.toml is now also located based on the current directory and
the pytest-root.
+ Terminal with is preserved.
+ solved incompatibility with pytest_pretty.
+ external_file() now follows the aliases defined by
register_format_alias().
+ fixed the representation of empty strings in sub-snapshots from
triple-quotes to single-quotes.
+ fix: changed format-command default to "".
+ The readline module doesn't have to be installed on non-windows
systems.
- Dropped patch no-readline.patch, included upstream.
-------------------------------------------------------------------
Mon May 26 14:14:35 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-inline-snapshot
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,14 +26,13 @@
%endif
%{?sle15_python_module_pythons}
Name: python-inline-snapshot%{psuffix}
Version: 0.23.1
Version: 0.29.1
Release: 0
Summary: Create and update inline snapshots in your Python code
License: MIT
URL: https://github.com/15r10nk/inline-snapshot/
Source: https://files.pythonhosted.org/packages/source/i/inline-snapshot/inline_snapshot-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/15r10nk/inline-snapshot/pull/245 also accept ImportError when attempting to import readline
Patch: no-readline.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros
@@ -49,7 +48,7 @@ BuildRequires: %{python_module pydantic}
BuildRequires: %{python_module pyright >= 1.1.359}
BuildRequires: %{python_module pytest-freezer >= 0.4.8}
BuildRequires: %{python_module pytest-mock >= 3.14.0}
BuildRequires: %{python_module pytest-subtests >= 0.11.0}
BuildRequires: %{python_module pytest-subtests >= 0.11.0 if %python-pytest < 9}
BuildRequires: %{python_module pytest-xdist >= 3.6.1}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module time-machine >= 2.10.0}
@@ -57,7 +56,8 @@ BuildRequires: %{python_module time-machine >= 2.10.0}
# /SECTION
BuildRequires: fdupes
Requires: python-asttokens >= 2.0.5
Requires: python-executing >= 2.0.0
Requires: python-executing >= 2.2.0
Requires: python-pytest >= 8.3.4
Requires: python-rich >= 13.7.1
%if 0%{?python_version_nodots} < 311
Requires: python-tomli >= 2.0.0