Skip to content

Commit

Permalink
[fc] Repository: plone.app.upgrade
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2024-11-27T15:33:40-03:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: plone/plone.app.upgrade@1fd176b

fix removed `unittest.makeSuite`

Files changed:
M plone/app/upgrade/tests/test_upgrade.py
M plone/app/upgrade/tests/test_utils.py
M plone/app/upgrade/v52/tests.py
Repository: plone.app.upgrade

Branch: refs/heads/master
Date: 2024-11-27T15:34:36-03:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: plone/plone.app.upgrade@211194a

changenote

Files changed:
A news/331.bugfix
Repository: plone.app.upgrade

Branch: refs/heads/master
Date: 2024-11-28T22:48:49-03:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: plone/plone.app.upgrade@69a2fbf

Merge pull request #331 from plone/py-3.13-unittest

Fix removed `unittest.makeSuite` in python 3.13

Files changed:
A news/331.bugfix
M plone/app/upgrade/tests/test_upgrade.py
M plone/app/upgrade/tests/test_utils.py
M plone/app/upgrade/v52/tests.py
  • Loading branch information
mauritsvanrees committed Nov 29, 2024
1 parent 03f7990 commit dbe58e3
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,52 @@
Repository: collective.monkeypatcher
Repository: plone.app.upgrade


Branch: refs/heads/master
Date: 2024-11-27T15:11:02-03:00
Date: 2024-11-27T15:33:40-03:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/collective.monkeypatcher/commit/8c5a3ddc436f6a0c10e62564ca3788d9cdf373f9
Commit: https://github.com/plone/plone.app.upgrade/commit/1fd176b145555ec3ed2e528ad127a5fa0ae47e9c

remove deprecated unittest.makeSuite
fix removed `unittest.makeSuite`

Files changed:
M src/collective/monkeypatcher/tests/test_monkeypatcher.py
M plone/app/upgrade/tests/test_upgrade.py
M plone/app/upgrade/tests/test_utils.py
M plone/app/upgrade/v52/tests.py

b'diff --git a/src/collective/monkeypatcher/tests/test_monkeypatcher.py b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\nindex fec3dff..30a7c8f 100644\n--- a/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n+++ b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n@@ -67,7 +67,8 @@ def test_monkeyPatchEvent(self):\n \n \n def test_suite():\n- from unittest import TestSuite, makeSuite\n- suite = TestSuite()\n- suite.addTest(makeSuite(TestMonkeyPatcher))\n- return suite\n+ import unittest\n+\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestMonkeyPatcher),\n+ ))\n'
b'diff --git a/plone/app/upgrade/tests/test_upgrade.py b/plone/app/upgrade/tests/test_upgrade.py\nindex bd12ec05..78c27853 100644\n--- a/plone/app/upgrade/tests/test_upgrade.py\n+++ b/plone/app/upgrade/tests/test_upgrade.py\n@@ -69,9 +69,8 @@ def testDoUpgrades(self):\n \n \n def test_suite():\n- from unittest import makeSuite\n- from unittest import TestSuite\n+ import unittest\n \n- suite = TestSuite()\n- suite.addTest(makeSuite(TestUpgrade))\n- return suite\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestUpgrade),\n+ ))\ndiff --git a/plone/app/upgrade/tests/test_utils.py b/plone/app/upgrade/tests/test_utils.py\nindex cc63e605..867a94b9 100644\n--- a/plone/app/upgrade/tests/test_utils.py\n+++ b/plone/app/upgrade/tests/test_utils.py\n@@ -82,9 +82,8 @@ def layers_in_selection(selection_name):\n \n \n def test_suite():\n- from unittest import makeSuite\n- from unittest import TestSuite\n+ import unittest\n \n- suite = TestSuite()\n- suite.addTest(makeSuite(TestUtils))\n- return suite\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestUtils),\n+ ))\ndiff --git a/plone/app/upgrade/v52/tests.py b/plone/app/upgrade/v52/tests.py\nindex 9dfa2962..d5aae824 100644\n--- a/plone/app/upgrade/v52/tests.py\n+++ b/plone/app/upgrade/v52/tests.py\n@@ -252,9 +252,9 @@ def test_suite():\n if not parse_version(plone_version) >= parse_version("5.2a1"):\n return unittest.TestSuite()\n \n- suite = unittest.TestSuite()\n- suite.addTest(unittest.makeSuite(UpgradeMemberData51to52Test))\n- suite.addTest(unittest.makeSuite(Various52Test))\n- suite.addTest(unittest.makeSuite(SiteLogoTest))\n- suite.addTest(unittest.makeSuite(UpgradePortalTransforms521to522Test))\n- return suite\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(UpgradeMemberData51to52Test),\n+ unittest.defaultTestLoader.loadTestsFromTestCase(Various52Test),\n+ unittest.defaultTestLoader.loadTestsFromTestCase(SiteLogoTest),\n+ unittest.defaultTestLoader.loadTestsFromTestCase(UpgradePortalTransforms521to522Test),\n+ ))\n'

Repository: collective.monkeypatcher
Repository: plone.app.upgrade


Branch: refs/heads/master
Date: 2024-11-27T15:12:13-03:00
Date: 2024-11-27T15:34:36-03:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/collective.monkeypatcher/commit/dd64846474ae56e32d1be52d2e24c228a18af032
Commit: https://github.com/plone/plone.app.upgrade/commit/211194a9c1137110f7456e7a8b58dfa2fcb6d51a

changenote

Files changed:
A news/14.bugfix
A news/331.bugfix

b'diff --git a/news/14.bugfix b/news/14.bugfix\nnew file mode 100644\nindex 0000000..41e6fd2\n--- /dev/null\n+++ b/news/14.bugfix\n@@ -0,0 +1,2 @@\n+Fix removed `unittest.makeSuite` in python 3.13.\n+[petschki]\n'
b'diff --git a/news/331.bugfix b/news/331.bugfix\nnew file mode 100644\nindex 00000000..41e6fd24\n--- /dev/null\n+++ b/news/331.bugfix\n@@ -0,0 +1,2 @@\n+Fix removed `unittest.makeSuite` in python 3.13.\n+[petschki]\n'

Repository: collective.monkeypatcher
Repository: plone.app.upgrade


Branch: refs/heads/master
Date: 2024-11-28T22:48:09-03:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/collective.monkeypatcher/commit/b68bd2bca30c5d7b4b9d192c40fd06c0d64a431d
Date: 2024-11-28T22:48:49-03:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: https://github.com/plone/plone.app.upgrade/commit/69a2fbfcc2b8550884c2db661fe5b74e366c9e4c

Merge pull request #14 from plone/py-3.13-unittest
Merge pull request #331 from plone/py-3.13-unittest

Fix removed `unittest.makeSuite` in py 3.13
Fix removed `unittest.makeSuite` in python 3.13

Files changed:
A news/14.bugfix
M src/collective/monkeypatcher/tests/test_monkeypatcher.py
A news/331.bugfix
M plone/app/upgrade/tests/test_upgrade.py
M plone/app/upgrade/tests/test_utils.py
M plone/app/upgrade/v52/tests.py

b'diff --git a/news/14.bugfix b/news/14.bugfix\nnew file mode 100644\nindex 0000000..41e6fd2\n--- /dev/null\n+++ b/news/14.bugfix\n@@ -0,0 +1,2 @@\n+Fix removed `unittest.makeSuite` in python 3.13.\n+[petschki]\ndiff --git a/src/collective/monkeypatcher/tests/test_monkeypatcher.py b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\nindex fec3dff..30a7c8f 100644\n--- a/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n+++ b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n@@ -67,7 +67,8 @@ def test_monkeyPatchEvent(self):\n \n \n def test_suite():\n- from unittest import TestSuite, makeSuite\n- suite = TestSuite()\n- suite.addTest(makeSuite(TestMonkeyPatcher))\n- return suite\n+ import unittest\n+\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestMonkeyPatcher),\n+ ))\n'
b'diff --git a/news/331.bugfix b/news/331.bugfix\nnew file mode 100644\nindex 00000000..41e6fd24\n--- /dev/null\n+++ b/news/331.bugfix\n@@ -0,0 +1,2 @@\n+Fix removed `unittest.makeSuite` in python 3.13.\n+[petschki]\ndiff --git a/plone/app/upgrade/tests/test_upgrade.py b/plone/app/upgrade/tests/test_upgrade.py\nindex bd12ec05..78c27853 100644\n--- a/plone/app/upgrade/tests/test_upgrade.py\n+++ b/plone/app/upgrade/tests/test_upgrade.py\n@@ -69,9 +69,8 @@ def testDoUpgrades(self):\n \n \n def test_suite():\n- from unittest import makeSuite\n- from unittest import TestSuite\n+ import unittest\n \n- suite = TestSuite()\n- suite.addTest(makeSuite(TestUpgrade))\n- return suite\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestUpgrade),\n+ ))\ndiff --git a/plone/app/upgrade/tests/test_utils.py b/plone/app/upgrade/tests/test_utils.py\nindex cc63e605..867a94b9 100644\n--- a/plone/app/upgrade/tests/test_utils.py\n+++ b/plone/app/upgrade/tests/test_utils.py\n@@ -82,9 +82,8 @@ def layers_in_selection(selection_name):\n \n \n def test_suite():\n- from unittest import makeSuite\n- from unittest import TestSuite\n+ import unittest\n \n- suite = TestSuite()\n- suite.addTest(makeSuite(TestUtils))\n- return suite\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestUtils),\n+ ))\ndiff --git a/plone/app/upgrade/v52/tests.py b/plone/app/upgrade/v52/tests.py\nindex 9dfa2962..d5aae824 100644\n--- a/plone/app/upgrade/v52/tests.py\n+++ b/plone/app/upgrade/v52/tests.py\n@@ -252,9 +252,9 @@ def test_suite():\n if not parse_version(plone_version) >= parse_version("5.2a1"):\n return unittest.TestSuite()\n \n- suite = unittest.TestSuite()\n- suite.addTest(unittest.makeSuite(UpgradeMemberData51to52Test))\n- suite.addTest(unittest.makeSuite(Various52Test))\n- suite.addTest(unittest.makeSuite(SiteLogoTest))\n- suite.addTest(unittest.makeSuite(UpgradePortalTransforms521to522Test))\n- return suite\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(UpgradeMemberData51to52Test),\n+ unittest.defaultTestLoader.loadTestsFromTestCase(Various52Test),\n+ unittest.defaultTestLoader.loadTestsFromTestCase(SiteLogoTest),\n+ unittest.defaultTestLoader.loadTestsFromTestCase(UpgradePortalTransforms521to522Test),\n+ ))\n'

0 comments on commit dbe58e3

Please sign in to comment.