You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be replaced with unittest.defaultTestLoader.loadTestsFromTestCase.
This is a patch that I verified is working:
diff --git a/test_pycosat.py b/test_pycosat.py
index f1165d8..0a6969c 100644
--- a/test_pycosat.py+++ b/test_pycosat.py@@ -258,7 +258,7 @@ def run(verbosity=1, repeat=1):
suite = unittest.TestSuite()
for cls in tests:
for _ in range(repeat):
- suite.addTest(unittest.makeSuite(cls))+ suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(cls))
runner = unittest.TextTestRunner(verbosity=verbosity)
return runner.run(suite)
unittest.defaultTestLoader.loadTestsFromTestCase appears to be backwards compatible as far back as Python 2.7, so there's no loss in compatibility from changing.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
bdice
added
the
type::bug
describes erroneous operation, use severity::* to classify the type
label
Nov 25, 2024
Checklist
What happened?
conda-forge/pycosat-feedstock#34 is failing because of a function
unittest.makeSuite
that was deprecated in Python 3.11 and removed in Python 3.13.pycosat/test_pycosat.py
Line 261 in ba33b47
This can be replaced with
unittest.defaultTestLoader.loadTestsFromTestCase
.This is a patch that I verified is working:
unittest.defaultTestLoader.loadTestsFromTestCase
appears to be backwards compatible as far back as Python 2.7, so there's no loss in compatibility from changing.Additional Context
No response
The text was updated successfully, but these errors were encountered: