# # spec file for package python-sure # # Copyright (c) 2021 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-%{**}} %define skip_python2 1 %define skip_python36 1 %define skip_python39 1 Name: python-sure Version: 2.0.0 Release: 1.5 Summary: Utility belt for automated testing in python for python License: GPL-3.0-or-later Group: Development/Languages/Python URL: https://github.com/gabrielfalcao/sure Source: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz BuildRequires: %{python_module mock >= 2.0.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: fdupes BuildRequires: python-rpm-macros # regarding mock: https://github.com/gabrielfalcao/sure/pull/161 Requires: python-mock >= 2.0.0 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 %setup -q -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 * Sun Dec 12 2021 Ben Greiner - 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 2020 pgajdos@suse.com - switch to pytest * Wed Aug 29 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 2018 tchvatal@suse.com - Fix url for the project * Sat Nov 4 2017 arun@gmx.de - update to version 1.4.7: * Remove wrong parens for format call. Refs #139 * Mon May 22 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 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 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 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 2013 mcihar@suse.cz - remove shebang from module sources * Tue Nov 19 2013 mcihar@suse.cz - various rpmlint fixes * Thu Nov 7 2013 mcihar@suse.cz - Initial packaging