From de45a2162a5904b089d332e144f20cc0a4645e4a Mon Sep 17 00:00:00 2001 From: Peter Mathis Date: Wed, 27 Nov 2024 15:44:07 -0300 Subject: [PATCH 1/3] fix removed `unittest.makeSuite` in python 3.13 --- plone/portlet/static/tests/test_portlet_static.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plone/portlet/static/tests/test_portlet_static.py b/plone/portlet/static/tests/test_portlet_static.py index 86f4b9b..b910a75 100644 --- a/plone/portlet/static/tests/test_portlet_static.py +++ b/plone/portlet/static/tests/test_portlet_static.py @@ -153,10 +153,9 @@ def test_relative_link(self): def test_suite(): - from unittest import makeSuite - from unittest import TestSuite + import unittest - suite = TestSuite() - suite.addTest(makeSuite(TestPortlet)) - suite.addTest(makeSuite(TestRenderer)) - return suite + return unittest.TestSuite(( + unittest.defaultTestLoader.loadTestsFromTestCase(TestPortlet), + unittest.defaultTestLoader.loadTestsFromTestCase(TestRenderer), + )) From ca35053b2c755fd88bd7fbd07e0c0fa8ff0d3c3e Mon Sep 17 00:00:00 2001 From: Peter Mathis Date: Wed, 27 Nov 2024 15:45:02 -0300 Subject: [PATCH 2/3] changenote --- news/45.bugfix | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 news/45.bugfix diff --git a/news/45.bugfix b/news/45.bugfix new file mode 100644 index 0000000..41e6fd2 --- /dev/null +++ b/news/45.bugfix @@ -0,0 +1,2 @@ +Fix removed `unittest.makeSuite` in python 3.13. +[petschki] From 6e10dac0f4e1c69922f9f8ede82cb20fe1bb579c Mon Sep 17 00:00:00 2001 From: Peter Mathis Date: Thu, 28 Nov 2024 11:33:23 -0300 Subject: [PATCH 3/3] black --- plone/portlet/static/tests/test_portlet_static.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plone/portlet/static/tests/test_portlet_static.py b/plone/portlet/static/tests/test_portlet_static.py index b910a75..379e2c1 100644 --- a/plone/portlet/static/tests/test_portlet_static.py +++ b/plone/portlet/static/tests/test_portlet_static.py @@ -155,7 +155,9 @@ def test_relative_link(self): def test_suite(): import unittest - return unittest.TestSuite(( - unittest.defaultTestLoader.loadTestsFromTestCase(TestPortlet), - unittest.defaultTestLoader.loadTestsFromTestCase(TestRenderer), - )) + return unittest.TestSuite( + ( + unittest.defaultTestLoader.loadTestsFromTestCase(TestPortlet), + unittest.defaultTestLoader.loadTestsFromTestCase(TestRenderer), + ) + )