# Created by pyp2rpm-3.2.2 %global pypi_name pytest-mock Name: python-%{pypi_name} Version: 1.6.2 Release: 1%{?dist} Summary: Thin-wrapper around the mock package for easier use with py.test 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: python-setuptools_scm BuildRequires: python-setuptools %description pytestmock This plugin installs a mocker fixture which is a thinwrapper 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:.. codeblock:: 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: python-pytest >= 2.7 Requires: python-setuptools %description -n python2-%{pypi_name} pytestmock This plugin installs a mocker fixture which is a thinwrapper 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:.. codeblock:: 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.py* %{python2_sitelib}/_pytest_mock_version.py* %{python2_sitelib}/pytest_mock-%{version}-py?.?.egg-info %changelog * Tue Jul 18 2017 Copr dist git - 1.6.2-1 - Initial package.