Accepting request 492870 from devel:languages:python
needed for new python-requests OBS-URL: https://build.opensuse.org/request/show/492870 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-mock?expand=0&rev=1
This commit is contained in:
commit
6962a44623
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
pytest-mock-1.6.0.tar.gz
Normal file
3
pytest-mock-1.6.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:83a17cbcd4dbc7c6c9dc885a0d598f9acd11f2d5142e0718ed32e14538670c1f
|
||||||
|
size 17780
|
14
python-pytest-mock.changes
Normal file
14
python-pytest-mock.changes
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 5 12:22:45 UTC 2017 - jmatejek@suse.com
|
||||||
|
|
||||||
|
- update to 1.6.0
|
||||||
|
* original assertions now appear in failure message
|
||||||
|
- shorten summary
|
||||||
|
- add requirements on mock and pytest
|
||||||
|
- enable tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 9 09:06:36 UTC 2017 - okurz@suse.com
|
||||||
|
|
||||||
|
- Initial singlespec submission
|
||||||
|
|
76
python-pytest-mock.spec
Normal file
76
python-pytest-mock.spec
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-pytest-mock
|
||||||
|
#
|
||||||
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%define modname pytest-mock
|
||||||
|
Name: python-%{modname}
|
||||||
|
Version: 1.6.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Thin-wrapper around the mock package for easier use with pytest
|
||||||
|
License: MIT
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
Url: https://github.com/pytest-dev/%{modname}
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module virtualenv}
|
||||||
|
%if 0%{?suse_version} < 1330
|
||||||
|
BuildRequires: python-mock
|
||||||
|
%else
|
||||||
|
BuildRequires: python2-mock
|
||||||
|
%endif
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-pytest
|
||||||
|
%ifpython2
|
||||||
|
Requires: python-mock
|
||||||
|
%else
|
||||||
|
Recommends: python-mock
|
||||||
|
%endif
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
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
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{modname}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%python_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%python_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{python_expand $python -m virtualenv --system-site-packages env-%{$python_bin_suffix}
|
||||||
|
. env-%{$python_bin_suffix}/bin/activate
|
||||||
|
$python setup.py install
|
||||||
|
$python -m pytest test_pytest_mock.py
|
||||||
|
deactivate }
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{python_sitelib}/*
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user