Compare commits

1 Commits
main ... 1.1

4 changed files with 3 additions and 89 deletions

View File

@@ -1,24 +0,0 @@
From d64843df5f339f486a9b29d492f2988a3bf8485b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
Date: Tue, 2 May 2023 13:48:00 +0200
Subject: [PATCH] Remove the usage of assertRaisesRegexp unit test alias
removed in Python 3.12
https://bugs.python.org/issue?@action=redirect&bpo=45162
---
parameterized/test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parameterized/test.py b/parameterized/test.py
index 6c71f79..498c591 100644
--- a/parameterized/test.py
+++ b/parameterized/test.py
@@ -35,7 +35,7 @@ def assert_raises_regexp_decorator(expected_exception, expected_regexp):
def func_decorator(func):
@wraps(func)
def wrapper(self, *args, **kwargs):
- with self.assertRaisesRegexp(expected_exception, expected_regexp):
+ with self.assertRaisesRegex(expected_exception, expected_regexp):
func(self, *args, **kwargs)
return wrapper

View File

@@ -1,41 +0,0 @@
From b08a1f287d379d13fe51239712a4d570bd0c556d Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Mon, 30 Oct 2023 10:38:27 -0400
Subject: [PATCH 1/2] Fix tests to handle Python 3.13 stripping indents from
docstrings
https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes
https://github.com/python/cpython/issues/81283
---
parameterized/test.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/parameterized/test.py b/parameterized/test.py
index 6c71f79..6419171 100644
--- a/parameterized/test.py
+++ b/parameterized/test.py
@@ -408,10 +408,16 @@ class TestParameterizedExpandDocstring(TestCase):
"""Documentation.
More"""
- self._assert_docstring(
- "Documentation [with foo=%r].\n\n"
- " More" %(foo, )
- )
+ if sys.version_info[:2] < (3, 13):
+ self._assert_docstring(
+ "Documentation [with foo=%r].\n\n"
+ " More" %(foo, )
+ )
+ else:
+ self._assert_docstring(
+ "Documentation [with foo=%r].\n\n"
+ "More" %(foo, )
+ )
@parameterized.expand([param("foo")])
def test_unicode_docstring(self, foo):
--
2.45.2

View File

@@ -1,15 +1,3 @@
-------------------------------------------------------------------
Mon Jul 22 11:26:38 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Cherry-pick upstream patch to fix tests with Python 3.13
* fix-tests-with-python3.13.patch
-------------------------------------------------------------------
Tue Aug 15 09:02:40 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch fix-assert-method.patch:
* Use correct assertion method.
-------------------------------------------------------------------
Fri May 12 09:54:40 UTC 2023 - Matej Cepl <mcepl@suse.com>
@@ -108,11 +96,6 @@ Tue Jun 2 14:26:24 UTC 2020 - pgajdos@suse.com
@duncwebb et al; https://github.com/wolever/parameterized/pull/74)
- drop dependency on unittest2
-------------------------------------------------------------------
Fri Dec 13 12:49:20 UTC 2019 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Include in SLE-15 (bsc#1159018, jsc#PM-1507)
-------------------------------------------------------------------
Thu Dec 5 15:52:40 CET 2019 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-parameterized
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -38,10 +38,6 @@ Patch1: remove_nose.patch
# PATCH-FIX-UPSTREAM skip_failing_teardown.patch gh#wolever/parameterized#167 mcepl@suse.com
# skip failing assert in tearDownModule [sic]
Patch2: skip_failing_teardown.patch
# PATCH-FIX-UPSTREAM gh#wolever/parameterized#169
Patch3: fix-assert-method.patch
# PATCH-FIX-UPSTREAM gh#wolever/parameterized#176
Patch4: fix-tests-with-python3.13.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
@@ -84,6 +80,6 @@ skip_tests="test_with_docstring_1_v_l_ or test_with_docstring_0_value1"
# %%doc CHANGELOG.txt
%license LICENSE.txt
%{python_sitelib}/parameterized
%{python_sitelib}/parameterized-%{version}.dist-info
%{python_sitelib}/parameterized-%{version}*-info
%changelog