python-pytest-mock/python-pytest-mock.spec

79 lines
2.6 KiB
RPMSpec
Raw Normal View History

2020-01-10 10:15:13 +08:00
Name: python-pytest-mock
2023-06-28 17:40:24 +08:00
Version: 3.11.1
2022-04-26 19:08:22 +08:00
Release: 1
2020-01-10 10:15:13 +08:00
Summary: Thin-wrapper around the mock package for easier use with py.test
License: MIT
URL: https://pypi.python.org/pypi/pytest-mock
2022-04-26 19:08:22 +08:00
Source0: https://files.pythonhosted.org/packages/b3/08/b131e1b5c628a7d46c9b8d676a86a8d235bced79b9d90845500e39df81b9/pytest-mock-%{version}.tar.gz
Patch0001: pytest-mock-issue272-asyncio.patch
2023-06-28 17:40:24 +08:00
2020-01-10 10:15:13 +08:00
BuildArch: noarch
%description
This plugin provides a mocker fixture which is a thin-wrapper around the
patching API provided by the mock package.
Besides undoing the mocking automatically after the end of the test,
it also provides other nice utilities.
%package -n python3-pytest-mock
Summary: Thin-wrapper around the mock package for easier use with py.test
BuildArch: noarch
2022-04-26 19:08:22 +08:00
BuildRequires: python3-devel python3-pytest >= 2.7 python3-setuptools_scm python3-pytest-mock
2020-01-10 10:15:13 +08:00
Requires: python3-pytest >= 2.7
%{?python_provide:%python_provide python3-pytest-mock}
%description -n python3-pytest-mock
This plugin provides a mocker fixture which is a thin-wrapper around the
patching API provided by the mock package.
Besides undoing the mocking automatically after the end of the test,
it also provides other nice utilities.
%prep
%autosetup -n pytest-mock-%{version} -p1
rm -rf *.egg-info
%build
%py3_build
%install
%py3_install
%check
2023-06-28 17:40:24 +08:00
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
PATH="%{buildroot}%{_bindir}:$PATH" \
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
PYTHONDONTWRITEBYTECODE=1 \
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \
%{_bindir}/pytest --assert=plain
2020-01-10 10:15:13 +08:00
%files -n python3-pytest-mock
%doc README.rst
%license LICENSE
%{python3_sitelib}/pytest_mock-%{version}-py%{python3_version}.egg-info/
2022-04-26 19:08:22 +08:00
%{python3_sitelib}/pytest_mock/
2020-01-10 10:15:13 +08:00
%changelog
2023-06-28 17:40:24 +08:00
* Wed Jun 28 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 3.11.1-1
- Update to 3.11.1
2022-04-26 19:08:22 +08:00
* Tue Apr 26 2022 caodongxia <caodongxia@h-partners.com> - 3.6.1-1
- update to 3.6.1
2021-01-12 15:22:14 +08:00
* Mon Jan 11 2021 maminjie <maminje1@huawei.com> - 1.10.0-8
- fix tests expectations with pytest4
2020-08-11 15:49:55 +08:00
* Tue Aug 11 2020 lingsheng <lingsheng@huawei.com> - 1.10.0-7
- Remove python2-pytest-mock subpackage
2020-06-28 21:34:19 +08:00
* Sun Jun 28 2020 lingsheng <lingsheng@huawei.com> - 1.10.0-6
- Tests handle new output format with Python 3.8
2020-06-24 16:43:54 +08:00
* Wed Jun 24 2020 lizhenhua <lizhenhua21@huawei.com> - 1.10.0-5
- Modify test cases for python3.8
2020-01-10 10:15:13 +08:00
* Wed Jan 08 2019 yangjian<yangjian79@huawei.com> - 1.10.0-4
- Package init