2017-05-16 14:28:46 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-pytest-mock
|
|
|
|
#
|
2023-04-24 11:15:28 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-05-16 14:28:46 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-24 17:05:20 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-16 14:28:46 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-24 11:15:28 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-04-26 13:34:36 +02:00
|
|
|
Name: python-pytest-mock
|
2023-11-07 20:36:34 +01:00
|
|
|
Version: 3.12.0
|
2017-05-16 14:28:46 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Thin-wrapper around the mock package for easier use with pytest
|
|
|
|
License: MIT
|
2018-04-26 13:34:36 +02:00
|
|
|
URL: https://github.com/pytest-dev/pytest-mock
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
|
2023-12-20 13:44:07 +01:00
|
|
|
# PATCH-FIX-UPSTREAM: fix-tests-python3117.patch gh#pytest-dev/pytest-mock#403
|
|
|
|
Patch0: fix-tests-python3117.patch
|
2023-11-07 20:36:34 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
2021-06-03 15:50:22 +02:00
|
|
|
BuildRequires: %{python_module pytest >= 5}
|
|
|
|
BuildRequires: %{python_module pytest-asyncio}
|
2022-11-30 12:28:26 +01:00
|
|
|
BuildRequires: %{python_module py}
|
2018-03-05 13:36:03 +01:00
|
|
|
BuildRequires: %{python_module setuptools >= 36}
|
2017-05-16 14:28:46 +02:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
2017-08-14 12:38:47 +02:00
|
|
|
BuildRequires: fdupes
|
2017-05-16 14:28:46 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-11-30 12:28:26 +01:00
|
|
|
Requires: python-py
|
2017-05-16 14:28:46 +02:00
|
|
|
Requires: python-pytest
|
2018-01-16 09:37:39 +01:00
|
|
|
BuildArch: noarch
|
2017-05-16 14:28:46 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
This plugin installs a ``mocker`` fixture which is a thin-wrapper around the patching API
|
2022-01-22 15:52:27 +01:00
|
|
|
provided by the `mock` package, but with the benefit of not having to worry about undoing
|
|
|
|
patches at the end of a test
|
2017-05-16 14:28:46 +02:00
|
|
|
|
|
|
|
%prep
|
2022-01-22 15:52:27 +01:00
|
|
|
%autosetup -p1 -n pytest-mock-%{version}
|
2017-05-16 14:28:46 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2017-08-14 12:38:47 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-05-16 14:28:46 +02:00
|
|
|
|
|
|
|
%check
|
2021-06-03 15:50:22 +02:00
|
|
|
%pytest --assert=plain
|
2017-05-16 14:28:46 +02:00
|
|
|
|
|
|
|
%files %{python_files}
|
2018-01-16 09:37:39 +01:00
|
|
|
%doc CHANGELOG.rst
|
|
|
|
%license LICENSE
|
2022-01-22 15:52:27 +01:00
|
|
|
%{python_sitelib}/pytest_mock
|
|
|
|
%{python_sitelib}/pytest_mock-%{version}*-info
|
2017-05-16 14:28:46 +02:00
|
|
|
|
|
|
|
%changelog
|