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

Avoid usage of unittest.makeSuite, removed from Python 3.13 #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_suite(filenames):
# we use the (potentially) patched version of json.load here
tests = jsonpatch.json.load(f)
cls = make_test_case(tests)
suite.addTest(unittest.makeSuite(cls))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(cls))

return suite

Expand Down
24 changes: 12 additions & 12 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,18 +1048,18 @@ class JsonPatch(jsonpatch.JsonPatch):
def get_suite():
suite = unittest.TestSuite()
suite.addTest(doctest.DocTestSuite(jsonpatch))
suite.addTest(unittest.makeSuite(ApplyPatchTestCase))
suite.addTest(unittest.makeSuite(EqualityTestCase))
suite.addTest(unittest.makeSuite(MakePatchTestCase))
suite.addTest(unittest.makeSuite(ListTests))
suite.addTest(unittest.makeSuite(InvalidInputTests))
suite.addTest(unittest.makeSuite(ConflictTests))
suite.addTest(unittest.makeSuite(OptimizationTests))
suite.addTest(unittest.makeSuite(JsonPointerTests))
suite.addTest(unittest.makeSuite(JsonPatchCreationTest))
suite.addTest(unittest.makeSuite(UtilityMethodTests))
suite.addTest(unittest.makeSuite(CustomJsonPointerTests))
suite.addTest(unittest.makeSuite(CustomOperationTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ApplyPatchTestCase))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(EqualityTestCase))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(MakePatchTestCase))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ListTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(InvalidInputTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(ConflictTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(OptimizationTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(JsonPointerTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(JsonPatchCreationTest))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(UtilityMethodTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CustomJsonPointerTests))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(CustomOperationTests))
return suite


Expand Down