Skip to content
Snippets Groups Projects
Commit aa647dfe authored by David Gobbi's avatar David Gobbi
Browse files

Work around deprecated unittest.makeSuite

The Python unittest.makeSuite() function is gone in Python 3.13,
replace with unittest.TestLoader.loadTestsFromTestCase()
parent 67592976
No related branches found
No related tags found
No related merge requests found
......@@ -515,8 +515,10 @@ def test(cases):
"""
# Make the test suites from the arguments.
suites = []
for case in cases:
suites.append(unittest.makeSuite(case[0], case[1]))
loader = unittest.TestLoader()
# the "name" is ignored (it was always just 'test')
for test,name in cases:
suites.append(loader.loadTestsFromTestCase(test))
test_suite = unittest.TestSuite(suites)
# Now run the tests.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment