Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re #83: Remove unittest.makeSuite as it is deprecated in Python 3.11+. #84

Merged
merged 1 commit into from Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -10,6 +10,10 @@
``ForbiddenAttribute`` on Python 3. See `issue 75
<https://github.com/zopefoundation/zope.security/issues/75>`_.

- Remove usage of ``unittest.makeSuite`` as it is deprecated in Python 3.11+.
See `issue 83
<https://github.com/zopefoundation/zope.security/issues/83>`_.


5.2 (2022-03-10)
================
Expand Down
6 changes: 3 additions & 3 deletions src/zope/security/tests/test_protectclass.py
Expand Up @@ -141,7 +141,7 @@ class Bar(Foo):

def test_suite():
return unittest.TestSuite((
unittest.makeSuite(Test_protectName),
unittest.makeSuite(Test_protectSetAttribute),
unittest.makeSuite(Test_protectLikeUnto),
unittest.defaultTestLoader.loadTestsFromTestCase(Test_protectName),
unittest.defaultTestLoader.loadTestsFromTestCase(Test_protectSetAttribute),
unittest.defaultTestLoader.loadTestsFromTestCase(Test_protectLikeUnto),
))
2 changes: 1 addition & 1 deletion src/zope/security/tests/test_simpleinteraction.py
Expand Up @@ -76,5 +76,5 @@ def testCreateInteraction(self):

def test_suite():
return unittest.TestSuite((
unittest.makeSuite(TestInteraction),
unittest.defaultTestLoader.loadTestsFromTestCase(TestInteraction),
))
8 changes: 4 additions & 4 deletions src/zope/security/tests/test_zcml.py
Expand Up @@ -193,8 +193,8 @@ def action(self, **kw):

def test_suite():
return unittest.TestSuite((
unittest.makeSuite(PermissionTests),
unittest.makeSuite(Test_securityPolicy),
unittest.makeSuite(Test_permission),
unittest.makeSuite(Test_redefinePermission),
unittest.defaultTestLoader.loadTestsFromTestCase(PermissionTests),
unittest.defaultTestLoader.loadTestsFromTestCase(Test_securityPolicy),
unittest.defaultTestLoader.loadTestsFromTestCase(Test_permission),
unittest.defaultTestLoader.loadTestsFromTestCase(Test_redefinePermission),
))