forked from pool/python-pyshould
Accepting request 1156835 from devel:languages:python
- Add patch fix-assertion-method.patch: * Fix assertion methods. - Switch to pyproject and autosetup macros. - Less globs in %files. OBS-URL: https://build.opensuse.org/request/show/1156835 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyshould?expand=0&rev=7
This commit is contained in:
20
fix-assertion-method.patch
Normal file
20
fix-assertion-method.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
Index: pyshould-0.7.1/tests/dsl.py
|
||||
===================================================================
|
||||
--- pyshould-0.7.1.orig/tests/dsl.py
|
||||
+++ pyshould-0.7.1/tests/dsl.py
|
||||
@@ -94,13 +94,13 @@ class DslTestCase(unittest.TestCase):
|
||||
def nested_expression_ok():
|
||||
with should.throw(TypeError):
|
||||
1 | should.equal(1)
|
||||
- self.assertRaisesRegexp(AssertionError,
|
||||
+ self.assertRaisesRegex(AssertionError,
|
||||
'TypeError', nested_expression_ok)
|
||||
|
||||
def nested_expression_fail():
|
||||
with should.throw(TypeError):
|
||||
1 | should.equal(2)
|
||||
- self.assertRaisesRegexp(AssertionError,
|
||||
+ self.assertRaisesRegex(AssertionError,
|
||||
'<2>', nested_expression_fail)
|
||||
|
||||
with should.throw(TypeError):
|
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 06:52:00 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch fix-assertion-method.patch:
|
||||
* Fix assertion methods.
|
||||
- Switch to pyproject and autosetup macros.
|
||||
- Less globs in %files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 18 22:32:35 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pyshould
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,16 +17,17 @@
|
||||
|
||||
|
||||
%define modname pyshould
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-%{modname}
|
||||
Version: 0.7.1
|
||||
Release: 0
|
||||
Summary: Should style asserts
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/drslump/%{modname}
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pyshould/%{modname}-%{version}.tar.gz
|
||||
Patch0: fix-assertion-method.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-hamcrest
|
||||
@@ -51,14 +52,14 @@ to the unit testing runner used, since mismatches are reported using
|
||||
the standard AssertionError.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{modname}-%{version}
|
||||
%autosetup -p1 -n %{modname}-%{version}
|
||||
sed -i '/nose/d' setup.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
# We shouldn't install tests
|
||||
%{python_expand rm -rvf %{buildroot}%{$python_sitelib}/tests
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
@@ -70,6 +71,7 @@ sed -i '/nose/d' setup.py
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/%{modname}*
|
||||
%{python_sitelib}/%{modname}
|
||||
%{python_sitelib}/%{modname}-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user