11
0
forked from pool/python-syrupy
Files
python-syrupy/python-syrupy.spec
Steve Kowalik 040fa9e545 - Update to 5.0.0:
* New Features
    + A new option, --snapshot-dirname, is now available to change the
      default directory snapshots are stored in.
    + The unnecessary underscore prefixes have been removed from public
      methods for better code clarity.
  * Bug Fixes
    + Resolve an issue where the terminal summary was not displayed correctly
      with xdist workers.
    + Ensure pytest_assertrepr_compare hook is called first.
  * Breaking Changes
    + Switch to the more permissive MIT license. This change applies to all
      versions from 5.0.0 and beyond.
    + Now requires Python 3.10 or higher. Support for Python 3.8 has been
      dropped. The minimum required version of pytest is v8.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-syrupy?expand=0&rev=15
2025-10-10 01:05:08 +00:00

69 lines
2.6 KiB
RPMSpec

#
# spec file for package python-syrupy
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-syrupy
Version: 5.0.0
Release: 0
Summary: Pytest Snapshot Test Utility
License: MIT
URL: https://github.com/tophat/syrupy
Source: https://github.com/tophat/syrupy/archive/refs/tags/v%{version}.tar.gz#/syrupy-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 1.4.0}
BuildRequires: %{python_module pytest >= 8.0.0}
BuildRequires: %{python_module pytest-benchmark >= 5.1.0}
BuildRequires: %{python_module pytest-xdist >= 3.6.1}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 8.0.0
BuildArch: noarch
%python_subpackages
%description
Syrupy is a [pytest](https://docs.pytest.org/en/latest/) snapshot plugin. It enables developers to write tests which assert immutability of computed results.
The most popular snapshot test plugin compatible with pytest has some core limitations which this package attempts to address by upholding some key values:
- Extensible: If a particular data type is not supported, users should be able to easily and quickly add support.
- Idiomatic: Snapshot testing should fit naturally among other test cases in pytest, e.g. `assert x == snapshot` vs. `snapshot.assert_match(x)`.
- Soundness: Snapshot tests should uncover even the most minute issues. Unlike other snapshot libraries, Syrupy will fail a test suite if a snapshot does not exist, not just on snapshot differences.
%prep
%autosetup -p1 -n syrupy-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# test_colors_off_does_not_call_colored - actually needs to access colored
%pytest -k "not test_colors_off_does_not_call_colored"
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/syrupy
%{python_sitelib}/syrupy-%{version}.dist-info
%changelog