Skip to content

Commit

Permalink
Merge pull request #45 from plone/py-3.13-unittest
Browse files Browse the repository at this point in the history
fix removed `unittest.makeSuite` in python 3.13
  • Loading branch information
mauritsvanrees authored Nov 29, 2024
2 parents 35c0f4f + 6e10dac commit f09fe92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions news/45.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix removed `unittest.makeSuite` in python 3.13.
[petschki]
13 changes: 7 additions & 6 deletions plone/portlet/static/tests/test_portlet_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ 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),
)
)

0 comments on commit f09fe92

Please sign in to comment.