c34a102
%global pypi_name pytest-mock
c34a102
%global file_name pytest_mock
c34a102
c34a102
Name:           python-%{pypi_name}
37629d0
Version:        3.12.0
e1dd032
Release:        4%{?dist}
c34a102
Summary:        Thin-wrapper around the mock package for easier use with py.test
c34a102
c34a102
License:        MIT
7485482
URL:            https://github.com/pytest-dev/pytest-mock/
7485482
Source0:        %{pypi_source}
150b6e2
# https://github.com/pytest-dev/pytest-mock/pull/404
150b6e2
Patch0:         0001-Update-expected-message.patch
150b6e2
c34a102
BuildArch:      noarch
c34a102
c34a102
%description
593b6f8
This plugin installs a mocker fixture which is a thin-wrapper around the
593b6f8
patching API provided by the mock package, but with the benefit of not having
593b6f8
to worry about undoing patches at the end of a test.
c34a102
c34a102
%package -n     python3-%{pypi_name}
c34a102
Summary:        %{summary}
593b6f8
c34a102
BuildRequires:  python3-devel
967ae89
BuildRequires:  %py3_dist setuptools
593b6f8
BuildRequires:  %py3_dist pytest
593b6f8
BuildRequires:  %py3_dist setuptools_scm
4ae31c5
%if %{undefined rhel}
593b6f8
BuildRequires:  %py3_dist pytest-asyncio
4ae31c5
%endif
c34a102
%{?python_provide:%python_provide python3-%{pypi_name}}
c34a102
c34a102
%description -n python3-%{pypi_name}
593b6f8
This plugin installs a mocker fixture which is a thin-wrapper around the
593b6f8
patching API provided by the mock package, but with the benefit of not having
593b6f8
to worry about undoing patches at the end of a test.
c34a102
c34a102
%prep
7485482
%autosetup -n %{pypi_name}-%{version} -p1
c34a102
rm -rf *.egg-info
c34a102
# Correct end of line encoding for README
c34a102
sed -i 's/\r$//' README.rst
c34a102
c34a102
%build
c34a102
%py3_build
c34a102
c34a102
%install
c34a102
%py3_install
c34a102
c34a102
%check
593b6f8
%pytest -v tests \
7485482
  -k "not test_standalone_mock and not test_detailed_introspection and not test_detailed_introspection \
8ba2503
  and not test_assert_called_args_with_introspection and not test_assert_called_kwargs_with_introspection \
8ba2503
  and not test_plain_stopall and not test_used_with_class_scope and not est_used_with_module_scope \
4ae31c5
  and not test_used_with_package_scope and not test_used_with_session_scope \
4ae31c5
  %{?rhel:and not test_instance_async_method_spy}"
c34a102
c34a102
%files -n python3-%{pypi_name}
7485482
%doc CHANGELOG.rst README.rst
c34a102
%license LICENSE
7485482
%{python3_sitelib}/%{file_name}/
c34a102
%{python3_sitelib}/%{file_name}-%{version}-py%{python3_version}.egg-info/
c34a102
c34a102
%changelog
e1dd032
* Thu Feb 08 2024 Julien Enselme <jujens@jujens.eu> - 3.12.0-4
e1dd032
- Bump version after adding patch to fix tests.
e1dd032
34772b2
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.0-3
34772b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
34772b2
e326823
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.0-2
e326823
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
e326823
37629d0
* Sat Oct 21 2023 Julien Enselme <jujens@jujens.eu> - 3.12.0-1
37629d0
- Update to 3.12.0
37629d0
a17c663
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.11.1-3
a17c663
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
a17c663
434be4b
* Tue Jul 04 2023 Python Maint <python-maint@redhat.com> - 3.11.1-2
434be4b
- Rebuilt for Python 3.12
434be4b
27042bd
* Tue Jul 04 2023 Julien Enselme <jujens@jujens.eu> - 3.11.1
27042bd
- Update to 3.11.1
27042bd
f56dddb
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.10.0-3
f56dddb
- Rebuilt for Python 3.12
f56dddb
5a6c52e
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.0-2
5a6c52e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
5a6c52e
157b89a
* Tue Nov 01 2022 Lumír Balhar <lbalhar@redhat.com> - 3.10.0-1
157b89a
- Update to 3.10.0
157b89a
Resolves: rhbz#2132453
157b89a
3947db1
* Wed Sep 28 2022 Fabian Affolter <mail@fabian-affolter.ch> - 3.9.0-1
3947db1
- Update to latest upstream release 3.9.0 (closes rhbz#2130519)
3947db1
49498a9
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.2-2
49498a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
49498a9
00d1775
* Wed Jul 06 2022 Julien Enselme <jujens@jujens.eu> - 3.8.2-1
00d1775
- Update to 3.8.2
00d1775
e7b7547
* Wed Jun 29 2022 Julien Enselme <jujens@jujens.eu> - 3.8.1-1
e7b7547
- Update to 3.8.1
e7b7547
ab79466
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.7.0-2
ab79466
- Rebuilt for Python 3.11
ab79466
8ba2503
* Wed Feb 23 2022 Fabian Affolter <mail@fabian-affolter.ch> - 3.7.0-1
8ba2503
- Update to latest upstream release 3.7.0 (closes rhbz#2047739)
8ba2503
ed14491
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.1-2
ed14491
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
ed14491
aa372c0
* Mon Jul 26 2021 Carl George <carl@george.computer> - 3.6.1-1
aa372c0
- Latest upstream
aa372c0
- Resolves: rhbz#1953232
aa372c0
0370697
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-4
0370697
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
0370697
344e64b
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 3.5.1-3
344e64b
- Rebuilt for Python 3.10
344e64b
3f5b776
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-2
3f5b776
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
3f5b776
6bd0b00
* Mon Jan 11 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.5.1-1
6bd0b00
- Update to new upstream release 3.5.1 (#1912592)
6bd0b00
ca0ae50
* Tue Jan 05 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.5.0-1
ca0ae50
- Update to new upstream release 3.5.0 (#1912592)
ca0ae50
593b6f8
* Wed Dec 16 2020 Fabian Affolter <mail@fabian-affolter.ch> - 3.4.0-1
593b6f8
- Update macros
593b6f8
- Update to new upstream release 3.4.0 (#1907878)
82bc630
82bc630
* Fri Aug 21 2020 Fabian Affolter <mail@fabian-affolter.ch> - 3.3.0-1
4e86220
- Update to latest upstream release 3.3.0 (rhbz#1871290)
4e86220
4e86220
* Fri Aug 21 2020 Fabian Affolter <mail@fabian-affolter.ch> - 3.2.0-1
7485482
- Update to latest upstream release 3.2.0 (rhbz#1756646)
7485482
ac1c266
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.4-10
ac1c266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ac1c266
dfac243
* Fri May 29 2020 Miro Hrončok <mhroncok@redhat.com> - 1.10.4-9
dfac243
- Drop manual requires on python3-pytest to support usage with pytest4 compat package
dfac243
2fbcbb8
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 1.10.4-8
2fbcbb8
- Rebuilt for Python 3.9
2fbcbb8
b0b07e4
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.4-7
b0b07e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b0b07e4
4962974
* Tue Oct 01 2019 Miro Hrončok <mhroncok@redhat.com> - 1.10.4-6
4962974
- Subpackage python2-pytest-mock has been removed
4962974
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
4962974
b456c65
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.10.4-5
b456c65
- Rebuilt for Python 3.8
b456c65
2e9a0ca
* Thu Aug 01 2019 Julien Enselme <jujens@jujens.eu> - 1.10.4-4
2e9a0ca
- Fix build issues with python 3.8 and mock 3.0
2e9a0ca
2ae657f
* Tue Jul 30 2019 Julien Enselme <jujens@jujens.eu> - 1.10.4-3
96dec41
- Fix build issues with pytest 4.6.3
96dec41
9c4c239
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.4-2
9c4c239
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9c4c239
e0b6cf8
* Sat Jul 13 2019 Julien Enselme <jujens@jujens.eu> - 1.10.4-1
e0b6cf8
- Update to 1.10.4
e0b6cf8
f49c972
* Thu Apr 04 2019 Miro Hrončok <mhroncok@redhat.com> - 1.10.3-1
f49c972
- Update to 1.10.3
f49c972
f7f2abf
* Sat Feb 23 2019 Julien Enselme <jujens@jujens.eu> - 1.10.1-1
f7f2abf
- Update to 1.10.1
f7f2abf
cdf0312
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-4
cdf0312
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cdf0312
3626a42
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-3
3626a42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3626a42
7b486af
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.10.0-2
7b486af
- Rebuilt for Python 3.7
7b486af
01d8fbe
* Mon May 07 2018 Julien Enselme <jujens@jujens.eu> - 1.10.0-1
01d8fbe
- Update to 1.10.0
01d8fbe
f311b4e
* Sun Apr 15 2018 Julien Enselme <jujens@jujens.eu> - 1.9.0-1
f311b4e
- Update to 1.9.0
f311b4e
9ed51e4
* Thu Mar 01 2018 Julien Enselme <jujens@jujens.eu> - 1.7.1-1
9ed51e4
- Update to 1.7.1
9ed51e4
05419cc
* Mon Feb 19 2018 Julien Enselme <jujens@jujesn.eu> - 1.7.0-1
05419cc
- Update to 1.7.0
05419cc
16f6219
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.3-2
16f6219
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
16f6219
d0c7e7f
* Sat Sep 16 2017 Julien Enselme <jujens@jujens.eu> - 1.6.3-1
d0c7e7f
- Update to 1.6.3
d0c7e7f
68c9b02
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-2
68c9b02
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
68c9b02
c166d3f
* Sun Jul 23 2017 Julien Enselme <jujens@jujens.eu> - 1.6.2-1
c166d3f
- Update to 1.6.2
c166d3f
be5a404
* Wed Apr 05 2017 Julien Enselme <jujens@jujens.eu> - 1.6.0-2
be5a404
- Add missing BR
be5a404
3385222
* Wed Apr 05 2017 Julien Enselme <jujens@jujens.eu> - 1.6.0-1
3385222
- Update to 1.6.0
3385222
14bedb2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-4
14bedb2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
14bedb2
ea361ad
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2-3
ea361ad
- Rebuild for Python 3.6
ea361ad
50f0b6c
* Sat Oct 01 2016 Julien Enselme <jujens@jujens.eu> - 1.2-2
50f0b6c
- Add patch to fix tests with pytest3
50f0b6c
7d95235
* Sun Sep 18 2016 Julien Enselme <jujens@jujens.eu> - 1.2-1
7d95235
- Update to 1.2
7d95235
c34a102
* Wed Aug 31 2016 Julien Enselme <jujens@jujens.eu> - 1.1-3
c34a102
- Use %%summary instead of custom %%sum macro
c34a102
c34a102
* Mon Aug 29 2016 Julien Enselme <jujens@jujens.eu> - 1.1-2
c34a102
- Add python2-mock to BR so %%check passes correctly.
c34a102
c34a102
* Tue Jul 26 2016 Julien Enselme <jujens@jujens.eu> - 1.1-1
c34a102
- Inital package