# Created by pyp2rpm-3.3.1 %global pypi_name pytest-mock Name: python-%{pypi_name} Version: 3.3.1 Release: %mkrel 1 Summary: Thin-wrapper around the mock package for easier use with py Group: Development/Python License: MIT URL: https://pypi.org/project/pytest-mock Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(mock) BuildRequires: python3dist(pytest) >= 2.7 BuildRequires: python3dist(setuptools) BuildRequires: python3dist(setuptools-scm) %description pytest-mock This plugin installs a mocker fixture which is a thin-wrapper around the patching API provided by the mock package < but with the benefit of not having to worry about undoing patches at the end of a test:.. code-block:: python import os class UnixFS: @staticmethod def rm(filename): os.remove(filename) def test_unix_fs(mocker): mocker.patch('os.remove') UnixFS.rm('file')... %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(mock) Requires: python3dist(pytest) >= 2.7 Requires: python3dist(setuptools) %description -n python3-%{pypi_name} pytest-mock This plugin installs a mocker fixture which is a thin-wrapper around the patching API provided by the mock package < but with the benefit of not having to worry about undoing patches at the end of a test:.. code-block:: python import os class UnixFS: @staticmethod def rm(filename): os.remove(filename) def test_unix_fs(mocker): mocker.patch('os.remove') UnixFS.rm('file')... %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build %install # Must do the default python version install last because # the scripts in /usr/bin are overwritten with every setup.py install. %py3_install %check %{__python3} setup.py test %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/pytest_mock %{python3_sitelib}/pytest_mock-%{version}-py?.?.egg-info %changelog * Wed Nov 25 2020 guillomovitch <guillomovitch> 3.3.1-1.mga8 + Revision: 1649302 - new version 3.3.1 * Sun Feb 16 2020 umeabot <umeabot> 1.10.4-3.mga8 + Revision: 1535322 - Mageia 8 Mass Rebuild * Fri Oct 11 2019 tv <tv> 1.10.4-2.mga8 + Revision: 1451727 - rebuild with python 3.8 * Fri Aug 09 2019 shlomif <shlomif> 1.10.4-1.mga8 + Revision: 1428459 - New version 1.10.4 - deprecate py2.x * Fri Mar 15 2019 shlomif <shlomif> 1.10.1-1.mga7 + Revision: 1377721 - New version 1.10.1 * Mon Jan 07 2019 shlomif <shlomif> 1.9.0-3.mga7 + Revision: 1350293 - Rebuild for python3 3.7 * Thu Sep 20 2018 umeabot <umeabot> 1.9.0-2.mga7 + Revision: 1289876 - Mageia 7 Mass Rebuild * Tue May 01 2018 shlomif <shlomif> 1.9.0-1.mga7 + Revision: 1224268 - build fixes - pyp2rpm