# Created by pyp2rpm-3.2.3 %global pypi_name pytest-mock Name: python-%{pypi_name} Version: 1.6.3 Release: 1%{?dist} Summary: Thin-wrapper around the mock package for easier use with py License: MIT URL: https://github.com/pytest-dev/pytest-mock/ Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-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 python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2-mock Requires: python2-pytest >= 2.7 Requires: python2-setuptools %description -n python2-%{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 %py2_build %install %py2_install %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitelib}/_pytest_mock_version.py* %{python2_sitelib}/pytest_mock.py* %{python2_sitelib}/pytest_mock-%{version}-py?.?.egg-info %changelog * Thu Nov 16 2017 mockbuilder - 1.6.3-1 - Initial package.