* [gentoo-commits] repo/gentoo:master commit in: dev-python/parameterized/, dev-python/parameterized/files/
@ 2022-05-26 10:45 Andrew Ammerlaan
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Ammerlaan @ 2022-05-26 10:45 UTC (permalink / raw
To: gentoo-commits
commit: 9c3bfb954f15cdd26777b967ee2ff4b8213ab634
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 09:59:25 2022 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu May 26 10:45:32 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c3bfb95
dev-python/parameterized: nose --> pytest, enable py3.11
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
.../files/parameterized-0.8.1-nose-to-pytest.patch | 101 +++++++++++++++++++++
.../parameterized/parameterized-0.8.1-r2.ebuild | 33 +++++++
2 files changed, 134 insertions(+)
diff --git a/dev-python/parameterized/files/parameterized-0.8.1-nose-to-pytest.patch b/dev-python/parameterized/files/parameterized-0.8.1-nose-to-pytest.patch
new file mode 100644
index 000000000000..45b86d8a13af
--- /dev/null
+++ b/dev-python/parameterized/files/parameterized-0.8.1-nose-to-pytest.patch
@@ -0,0 +1,101 @@
+diff --git a/parameterized/test.py b/parameterized/test.py
+index f98d865..ede7689 100644
+--- a/parameterized/test.py
++++ b/parameterized/test.py
+@@ -2,8 +2,8 @@
+
+ import inspect
+ import mock
++import pytest
+ from unittest import TestCase
+-from nose.tools import assert_equal, assert_raises
+
+ from .parameterized import (
+ PY3, PY2, parameterized, param, parameterized_argument_value_pairs,
+@@ -91,7 +91,7 @@ if not PYTEST:
+
+ @parameterized([(1, ), (2, )])
+ def test_setup(self, count, *a):
+- assert_equal(self.actual_order, "setup %s" %(count, ))
++ assert self.actual_order == "setup %s" %(count, )
+ missing_tests.remove("test_setup(%s)" %(self.actual_order, ))
+
+
+@@ -235,9 +235,9 @@ class TestParamerizedOnTestCase(TestCase):
+ frame_locals = frame[0].f_locals
+ nose_test_method_name = frame_locals['a'][0]._testMethodName
+ expected_name = "test_on_TestCase2_custom_name_" + str(foo)
+- assert_equal(nose_test_method_name, expected_name,
+- "Test Method name '%s' did not get customized to expected: '%s'" %
+- (nose_test_method_name, expected_name))
++ assert nose_test_method_name == expected_name, \
++ "Test Method name '%s' did not get customized to expected: '%s'" % \
++ (nose_test_method_name, expected_name)
+ missing_tests.remove("%s(%r, bar=%r)" %(expected_name, foo, bar))
+
+
+@@ -259,7 +259,7 @@ class TestParameterizedExpandDocstring(TestCase):
+ actual_docstring = test_method.__doc__
+ if rstrip:
+ actual_docstring = actual_docstring.rstrip()
+- assert_equal(actual_docstring, expected_docstring)
++ assert actual_docstring == expected_docstring
+
+ @parameterized.expand([param("foo")],
+ doc_func=lambda f, n, p: "stuff")
+@@ -335,7 +335,7 @@ def test_helpful_error_on_empty_iterable_input():
+
+ def test_skip_test_on_empty_iterable():
+ func = parameterized([], skip_on_empty=True)(lambda: None)
+- assert_raises(SkipTest, func)
++ pytest.raises(SkipTest, func)
+
+
+ def test_helpful_error_on_empty_iterable_input_expand():
+@@ -366,10 +366,6 @@ def test_helpful_error_on_non_iterable_input():
+ raise AssertionError("Expected exception not raised")
+
+
+-def tearDownModule():
+- missing = sorted(list(missing_tests))
+- assert_equal(missing, [])
+-
+ def test_old_style_classes():
+ if PY3:
+ raise SkipTest("Py3 doesn't have old-style classes")
+@@ -418,7 +414,7 @@ class TestOldStyleClass:
+ def test_parameterized_argument_value_pairs(func_params, p, expected):
+ helper = eval("lambda %s: None" %(func_params, ))
+ actual = parameterized_argument_value_pairs(helper, p)
+- assert_equal(actual, expected)
++ assert actual == expected
+
+
+ @parameterized([
+@@ -428,7 +424,7 @@ def test_parameterized_argument_value_pairs(func_params, p, expected):
+ (123456789, "12...89", 4),
+ ])
+ def test_short_repr(input, expected, n=6):
+- assert_equal(short_repr(input, n=n), expected)
++ assert short_repr(input, n=n) == expected
+
+ @parameterized([
+ ("foo", ),
+@@ -442,7 +438,7 @@ cases_over_10 = [(i, i+1) for i in range(11)]
+
+ @parameterized(cases_over_10)
+ def test_cases_over_10(input, expected):
+- assert_equal(input, expected-1)
++ assert input == expected-1
+
+
+ @parameterized_class(("a", "b", "c"), [
+@@ -461,7 +457,7 @@ class TestParameterizedClass(TestCase):
+
+ def _assertions(self, test_name):
+ assert hasattr(self, "a")
+- assert_equal(self.b + self.c, 3)
++ assert self.b + self.c == 3
+ missing_tests.remove("%s:%s(%r, %r, %r)" %(
+ self.__class__.__name__,
+ test_name,
diff --git a/dev-python/parameterized/parameterized-0.8.1-r2.ebuild b/dev-python/parameterized/parameterized-0.8.1-r2.ebuild
new file mode 100644
index 000000000000..06dbc5e9d590
--- /dev/null
+++ b/dev-python/parameterized/parameterized-0.8.1-r2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="Parameterized testing with any Python test framework"
+HOMEPAGE="https://github.com/wolever/parameterized/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+BDEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-nose-to-pytest.patch"
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ epytest parameterized/test.py
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/parameterized/, dev-python/parameterized/files/
@ 2023-04-28 14:40 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2023-04-28 14:40 UTC (permalink / raw
To: gentoo-commits
commit: 020e0ec4f8b432f4a1809aa9ea0a0718d739418d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 28 14:39:35 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 28 14:40:30 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=020e0ec4
dev-python/parameterized: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/parameterized/Manifest | 1 -
.../files/parameterized-0.8.1-nose-to-pytest.patch | 101 ---------------------
.../parameterized/parameterized-0.8.1-r2.ebuild | 35 -------
3 files changed, 137 deletions(-)
diff --git a/dev-python/parameterized/Manifest b/dev-python/parameterized/Manifest
index bb27ab2f92d5..989a4b866dc2 100644
--- a/dev-python/parameterized/Manifest
+++ b/dev-python/parameterized/Manifest
@@ -1,2 +1 @@
-DIST parameterized-0.8.1.tar.gz 23936 BLAKE2B 3d36b049071907f66ef17dcae0ef9480210344f2466744b2bee8e964f46e2553411a07b233fab032d1acbc2523dc32890bc5e6e4ffc5b37d1fee3f0db3a70cbb SHA512 ad6e31b2bb27623bf070ee5c30686a5bd6a531bc71602f77ca6aa01a77fc246caaacca121098dcbe13b1a174cdcfafa6545bf6e62f6a5337a647821c02fac64a
DIST parameterized-0.9.0.tar.gz 24351 BLAKE2B 3b0fb1c0a788f702cba74b67868fbd179e4912b518646f6a7d0d136f54b515d2546d27ad1fd14a03c128a8b53d42165a4ef9f8f434965483af24f69c3e406b25 SHA512 2c1c97a841db631608e0a9fcd93fa1af819aa288538851e0c771b56ba0bb27fb682ac3a09fcdb33e57162926d1e8fae452f7bab9384d0c40bec9a03ab3d6b126
diff --git a/dev-python/parameterized/files/parameterized-0.8.1-nose-to-pytest.patch b/dev-python/parameterized/files/parameterized-0.8.1-nose-to-pytest.patch
deleted file mode 100644
index 45b86d8a13af..000000000000
--- a/dev-python/parameterized/files/parameterized-0.8.1-nose-to-pytest.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-diff --git a/parameterized/test.py b/parameterized/test.py
-index f98d865..ede7689 100644
---- a/parameterized/test.py
-+++ b/parameterized/test.py
-@@ -2,8 +2,8 @@
-
- import inspect
- import mock
-+import pytest
- from unittest import TestCase
--from nose.tools import assert_equal, assert_raises
-
- from .parameterized import (
- PY3, PY2, parameterized, param, parameterized_argument_value_pairs,
-@@ -91,7 +91,7 @@ if not PYTEST:
-
- @parameterized([(1, ), (2, )])
- def test_setup(self, count, *a):
-- assert_equal(self.actual_order, "setup %s" %(count, ))
-+ assert self.actual_order == "setup %s" %(count, )
- missing_tests.remove("test_setup(%s)" %(self.actual_order, ))
-
-
-@@ -235,9 +235,9 @@ class TestParamerizedOnTestCase(TestCase):
- frame_locals = frame[0].f_locals
- nose_test_method_name = frame_locals['a'][0]._testMethodName
- expected_name = "test_on_TestCase2_custom_name_" + str(foo)
-- assert_equal(nose_test_method_name, expected_name,
-- "Test Method name '%s' did not get customized to expected: '%s'" %
-- (nose_test_method_name, expected_name))
-+ assert nose_test_method_name == expected_name, \
-+ "Test Method name '%s' did not get customized to expected: '%s'" % \
-+ (nose_test_method_name, expected_name)
- missing_tests.remove("%s(%r, bar=%r)" %(expected_name, foo, bar))
-
-
-@@ -259,7 +259,7 @@ class TestParameterizedExpandDocstring(TestCase):
- actual_docstring = test_method.__doc__
- if rstrip:
- actual_docstring = actual_docstring.rstrip()
-- assert_equal(actual_docstring, expected_docstring)
-+ assert actual_docstring == expected_docstring
-
- @parameterized.expand([param("foo")],
- doc_func=lambda f, n, p: "stuff")
-@@ -335,7 +335,7 @@ def test_helpful_error_on_empty_iterable_input():
-
- def test_skip_test_on_empty_iterable():
- func = parameterized([], skip_on_empty=True)(lambda: None)
-- assert_raises(SkipTest, func)
-+ pytest.raises(SkipTest, func)
-
-
- def test_helpful_error_on_empty_iterable_input_expand():
-@@ -366,10 +366,6 @@ def test_helpful_error_on_non_iterable_input():
- raise AssertionError("Expected exception not raised")
-
-
--def tearDownModule():
-- missing = sorted(list(missing_tests))
-- assert_equal(missing, [])
--
- def test_old_style_classes():
- if PY3:
- raise SkipTest("Py3 doesn't have old-style classes")
-@@ -418,7 +414,7 @@ class TestOldStyleClass:
- def test_parameterized_argument_value_pairs(func_params, p, expected):
- helper = eval("lambda %s: None" %(func_params, ))
- actual = parameterized_argument_value_pairs(helper, p)
-- assert_equal(actual, expected)
-+ assert actual == expected
-
-
- @parameterized([
-@@ -428,7 +424,7 @@ def test_parameterized_argument_value_pairs(func_params, p, expected):
- (123456789, "12...89", 4),
- ])
- def test_short_repr(input, expected, n=6):
-- assert_equal(short_repr(input, n=n), expected)
-+ assert short_repr(input, n=n) == expected
-
- @parameterized([
- ("foo", ),
-@@ -442,7 +438,7 @@ cases_over_10 = [(i, i+1) for i in range(11)]
-
- @parameterized(cases_over_10)
- def test_cases_over_10(input, expected):
-- assert_equal(input, expected-1)
-+ assert input == expected-1
-
-
- @parameterized_class(("a", "b", "c"), [
-@@ -461,7 +457,7 @@ class TestParameterizedClass(TestCase):
-
- def _assertions(self, test_name):
- assert hasattr(self, "a")
-- assert_equal(self.b + self.c, 3)
-+ assert self.b + self.c == 3
- missing_tests.remove("%s:%s(%r, %r, %r)" %(
- self.__class__.__name__,
- test_name,
diff --git a/dev-python/parameterized/parameterized-0.8.1-r2.ebuild b/dev-python/parameterized/parameterized-0.8.1-r2.ebuild
deleted file mode 100644
index dfdd966aed8f..000000000000
--- a/dev-python/parameterized/parameterized-0.8.1-r2.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{9..11} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Parameterized testing with any Python test framework"
-HOMEPAGE="
- https://github.com/wolever/parameterized/
- https://pypi.org/project/parameterized/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-BDEPEND="
- test? (
- dev-python/mock[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${P}-nose-to-pytest.patch"
-)
-
-distutils_enable_tests pytest
-
-python_test() {
- epytest parameterized/test.py
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/parameterized/, dev-python/parameterized/files/
@ 2023-05-31 16:49 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-05-31 16:49 UTC (permalink / raw
To: gentoo-commits
commit: 4796b33e27ecdbf66e154df8f86c12f0a350b4e2
Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Wed May 31 16:06:44 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 31 16:49:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4796b33e
dev-python/parameterized: enable py3.12
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/parameterized-0.9.0-py312-test.patch | 17 +++++++++++++++++
dev-python/parameterized/parameterized-0.9.0.ebuild | 6 +++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/dev-python/parameterized/files/parameterized-0.9.0-py312-test.patch b/dev-python/parameterized/files/parameterized-0.9.0-py312-test.patch
new file mode 100644
index 000000000000..457cd58da75c
--- /dev/null
+++ b/dev-python/parameterized/files/parameterized-0.9.0-py312-test.patch
@@ -0,0 +1,17 @@
+Remove the usage of assertRaisesRegexp unit test alias removed in Python 3.12
+
+Upstream-PR: https://github.com/wolever/parameterized/pull/169
+
+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
diff --git a/dev-python/parameterized/parameterized-0.9.0.ebuild b/dev-python/parameterized/parameterized-0.9.0.ebuild
index cdcdc7bff151..5ba5013e9c36 100644
--- a/dev-python/parameterized/parameterized-0.9.0.ebuild
+++ b/dev-python/parameterized/parameterized-0.9.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{9..11} )
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
inherit distutils-r1 pypi
@@ -24,4 +24,8 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/${P}-py312-test.patch"
+)
+
distutils_enable_tests unittest
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/parameterized/, dev-python/parameterized/files/
@ 2024-06-12 10:03 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2024-06-12 10:03 UTC (permalink / raw
To: gentoo-commits
commit: be5b82b9963775d3f4e0da8abc39424527cc7ed1
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 09:38:57 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 12 10:03:18 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be5b82b9
dev-python/parameterized: Enable py3.13
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/parameterized-0.9.0-py313-test.patch | 26 ++++++++++++++++++++++
.../parameterized/parameterized-0.9.0.ebuild | 6 +++--
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch b/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch
new file mode 100644
index 000000000000..cad68e9b7921
--- /dev/null
+++ b/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch
@@ -0,0 +1,26 @@
+From 85cd1c5e0b95a75385e68972ceef3329edb7b7f0 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 6419171..6d11e32 100644
+--- a/parameterized/test.py
++++ b/parameterized/test.py
+@@ -385,6 +385,8 @@ def _assert_docstring(self, expected_docstring, rstrip=False):
+ actual_docstring = test_method.__doc__
+ if rstrip:
+ actual_docstring = actual_docstring.rstrip()
++ if sys.version_info[:2] >= (3, 13):
++ expected_docstring = inspect.cleandoc(expected_docstring)
+ assert_equal(actual_docstring, expected_docstring)
+
+ @parameterized.expand([param("foo")],
diff --git a/dev-python/parameterized/parameterized-0.9.0.ebuild b/dev-python/parameterized/parameterized-0.9.0.ebuild
index 5ba5013e9c36..15e0862bcdd3 100644
--- a/dev-python/parameterized/parameterized-0.9.0.ebuild
+++ b/dev-python/parameterized/parameterized-0.9.0.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit distutils-r1 pypi
@@ -26,6 +26,8 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${P}-py312-test.patch"
+ # https://github.com/wolever/parameterized/pull/176
+ "${FILESDIR}/${P}-py313-test.patch"
)
distutils_enable_tests unittest
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-12 10:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 14:40 [gentoo-commits] repo/gentoo:master commit in: dev-python/parameterized/, dev-python/parameterized/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2024-06-12 10:03 Michał Górny
2023-05-31 16:49 Sam James
2022-05-26 10:45 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox