Sync from SUSE:SLFO:Main python-sure revision d11e1d7909a95eae34c0f3d42fc36a76
This commit is contained in:
commit
764d678a2c
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
|
37
python-sure-no-mock.patch
Normal file
37
python-sure-no-mock.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
Index: sure-2.0.0/sure/core.py
|
||||||
|
===================================================================
|
||||||
|
--- sure-2.0.0.orig/sure/core.py
|
||||||
|
+++ sure-2.0.0/sure/core.py
|
||||||
|
@@ -21,7 +21,10 @@ import os
|
||||||
|
try:
|
||||||
|
from mock import _CallList
|
||||||
|
except ImportError:
|
||||||
|
- from mock.mock import _CallList
|
||||||
|
+ try:
|
||||||
|
+ from mock.mock import _CallList
|
||||||
|
+ except ImportError:
|
||||||
|
+ from unittest.mock import _CallList
|
||||||
|
|
||||||
|
import inspect
|
||||||
|
from six import (
|
||||||
|
@@ -40,6 +43,7 @@ class Anything(object):
|
||||||
|
def __eq__(self, _):
|
||||||
|
return True
|
||||||
|
|
||||||
|
+
|
||||||
|
anything = Anything()
|
||||||
|
|
||||||
|
|
||||||
|
Index: sure-2.0.0/tests/test_assertion_builder.py
|
||||||
|
===================================================================
|
||||||
|
--- sure-2.0.0.orig/tests/test_assertion_builder.py
|
||||||
|
+++ sure-2.0.0/tests/test_assertion_builder.py
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import re
|
||||||
|
-import mock
|
||||||
|
+from unittest import mock
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
from datetime import datetime, timedelta
|
119
python-sure.changes
Normal file
119
python-sure.changes
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 13 04:37:13 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Remove mock from BuildRequires.
|
||||||
|
- Rebase python-sure-no-mock.patch to remove one missed import.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 4 08:38:45 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require mock for build nor runtime
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/gabrielfalcao/sure/pull/161
|
||||||
|
+ python-sure-no-mock.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 12 16:15:50 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to 2.0.0
|
||||||
|
* No longer patch the builtin dir() function, which fixes pytest
|
||||||
|
in some cases such as projects using gevent.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 12 07:59:31 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- switch to pytest
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 29 11:47:15 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Version update to 1.4.11:
|
||||||
|
* Reading the version dynamically was causing import errors that caused error when installing package. Refs #144
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 2 13:38:53 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Fix url for the project
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 4 02:06:40 UTC 2017 - arun@gmx.de
|
||||||
|
|
||||||
|
- update to version 1.4.7:
|
||||||
|
* Remove wrong parens for format call. Refs #139
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 22 16:52:16 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement single-spec version.
|
||||||
|
- Fix source URL.
|
||||||
|
- Update to version 1.4.6
|
||||||
|
* Enormous number of changes. Please see full changelog here:
|
||||||
|
https://github.com/gabrielfalcao/sure/blob/v1.4.6/CHANGELOG.md
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 9 11:16:30 UTC 2016 - dvaleev@suse.com
|
||||||
|
|
||||||
|
- Update to 1.2.24
|
||||||
|
- Fix #48.
|
||||||
|
Ready to fast forward, Python 3.4 support again
|
||||||
|
Fixed a grammar nit when two things are not equal
|
||||||
|
|
||||||
|
- When two things are not equal to each other, they “differ from” each other.
|
||||||
|
- fix: #80
|
||||||
|
AttributeError: 'module' object has no attribute '_CallList'
|
||||||
|
|
||||||
|
- Fix python3 setup.py file read encoding issue.
|
||||||
|
- adding carpentry build
|
||||||
|
- fixing api
|
||||||
|
|
||||||
|
- New feature:
|
||||||
|
.should.have.thrown() alias to should.throw
|
||||||
|
.should.have.raised() alias to should.throw
|
||||||
|
.should.have.returned_the_value alias ro should.return_value
|
||||||
|
|
||||||
|
- make python 3 compatible again
|
||||||
|
The function objects in python 3 have no `func_code` member anymore. Use `__code__` instead.
|
||||||
|
The byte objects in python 3 have no `format` method. Use `encode` instead.
|
||||||
|
The representation of the strings and encoded strings are different in python 2 and python 3 thus use PY3 from six.
|
||||||
|
Remove unlucky example from README since python 3 returns a float and python 2 an int in this situation
|
||||||
|
Python 2 and 3 build is working again
|
||||||
|
|
||||||
|
-Fix #48.
|
||||||
|
AssertionBuilder.__call__ wasn't pushing through the
|
||||||
|
_callable_args and _callable_kw attributes, so they
|
||||||
|
weren't percolated through the assertion chain.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 22 11:35:20 UTC 2015 - mcihar@suse.cz
|
||||||
|
|
||||||
|
- Update to 1.2.10
|
||||||
|
* No upstream changelog available
|
||||||
|
- Remove only shebang by sed
|
||||||
|
- Run testsuite directly from setup.py
|
||||||
|
- Remove not needed patches (runTestsOnly.patch, sure_hideDeps.patch)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 6 16:36:59 UTC 2015 - rjschwei@suse.com
|
||||||
|
|
||||||
|
- Update to version 1.2.5
|
||||||
|
* No upstream changelog available
|
||||||
|
- remove Remove-shebang-line.patch, replaced by sed expression
|
||||||
|
- add sure_hideDeps.patch, hides implicit Python dependencies
|
||||||
|
- add runTestsOnly.patch only run the tests with make test
|
||||||
|
- run the package tests as part of the package build
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 19 12:14:54 UTC 2013 - mcihar@suse.cz
|
||||||
|
|
||||||
|
- remove shebang from module sources
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 19 08:35:50 UTC 2013 - mcihar@suse.cz
|
||||||
|
|
||||||
|
- various rpmlint fixes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 7 10:55:37 UTC 2013 - mcihar@suse.cz
|
||||||
|
|
||||||
|
- Initial packaging
|
||||||
|
|
75
python-sure.spec
Normal file
75
python-sure.spec
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-sure
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 SUSE LLC
|
||||||
|
#
|
||||||
|
# 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 https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
Name: python-sure
|
||||||
|
Version: 2.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Utility belt for automated testing in python for python
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
URL: https://github.com/gabrielfalcao/sure
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz
|
||||||
|
# Based on https://github.com/gabrielfalcao/sure/pull/161
|
||||||
|
Patch0: python-sure-no-mock.patch
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module six >= 1.10.0}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-six >= 1.10.0
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun):update-alternatives
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
A testing library for python with powerful and flexible assertions. Sure is
|
||||||
|
heavily inspired by should.js
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n sure-%{version}
|
||||||
|
sed -i '/^#!/d' sure/*.py
|
||||||
|
sed -i 's/--cov=sure//' setup.cfg
|
||||||
|
|
||||||
|
%build
|
||||||
|
%python_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/sure
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
# requires nose
|
||||||
|
rm tests/test_old_api.py
|
||||||
|
%pytest
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative sure
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative sure
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license COPYING
|
||||||
|
%doc README.rst
|
||||||
|
%python_alternative %{_bindir}/sure
|
||||||
|
%{python_sitelib}/sure
|
||||||
|
%{python_sitelib}/sure-%{version}*-info
|
||||||
|
|
||||||
|
%changelog
|
BIN
sure-2.0.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
sure-2.0.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user