]> git.pld-linux.org Git - packages/python3-pytest-mock.git/blame - python3-pytest-mock.spec
rebuild with tests and docs
[packages/python3-pytest-mock.git] / python3-pytest-mock.spec
CommitLineData
bd3d8e27
JB
1#
2# Conditional build:
3%bcond_without tests # py.test tests
4
5Summary: Thin-wrapper around the mock package for easier use with py.test
6Summary(pl.UTF-8): Cienka warstwa obudowująca pakiet mock, ułatwiająca używanie wraz z py.test
7Name: python3-pytest-mock
0a882d41 8Version: 3.7.0
cca9553f 9Release: 3
bd3d8e27
JB
10License: MIT
11Group: Libraries/Python
12#Source0Download: https://pypi.org/simple/pytest-mock/
13Source0: https://files.pythonhosted.org/packages/source/p/pytest-mock/pytest-mock-%{version}.tar.gz
0a882d41 14# Source0-md5: 8a17273e0dd1edd32b9c01e876a824fd
bd3d8e27 15URL: https://pypi.org/project/pytest-mock/
0a882d41 16BuildRequires: python3-modules >= 1:3.7
bd3d8e27
JB
17BuildRequires: python3-setuptools
18BuildRequires: python3-setuptools_scm
19%if %{with tests}
20BuildRequires: python3-pytest >= 5.0
21BuildRequires: python3-pytest-asyncio
22# there is py3 test which relies on "mock" standalone module not being installed
23BuildConflicts: python3-mock
24%endif
25BuildRequires: rpm-pythonprov
26BuildRequires: rpmbuild(macros) >= 1.714
0a882d41 27Requires: python3-modules >= 1:3.7
bd3d8e27
JB
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32This plugin installs a mocker fixture which is a thin-wrapper around
33the patching API provided by the mock package, but with the benefit of
34not having to worry about undoing patches at the end of a test.
35
36%description -l pl.UTF-8
37Ta wtyczka instaluje osprzęt (fixture) do tworzenia atrap, będący
38cienką warstwą ponad API dostarczane przez pakiet mock, ale
39pozwalający nie martwić się o wycofywanie łat na końcu testu.
40
41%prep
42%setup -q -n pytest-mock-%{version}
43
44%build
45%py3_build
46
47%if %{with tests}
48PYTHONPATH=$(pwd)/src \
49PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
50PYTEST_PLUGINS="pytest_asyncio.plugin,pytest_mock" \
51%{__python3} -m pytest tests
52%endif
53
54%install
55rm -rf $RPM_BUILD_ROOT
56
57%py3_install
58
59%clean
60rm -rf $RPM_BUILD_ROOT
61
62%files
63%defattr(644,root,root,755)
64%doc CHANGELOG.rst LICENSE README.rst
65%{py3_sitescriptdir}/pytest_mock
66%{py3_sitescriptdir}/pytest_mock-%{version}-py*.egg-info
This page took 0.164272 seconds and 4 git commands to generate.