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

Feature Proposal: Rewrite unittest.makeSuite|getTestCaseNames|findTestCases. #631

Closed
sallner opened this issue Apr 13, 2022 · 3 comments · Fixed by #647
Closed

Feature Proposal: Rewrite unittest.makeSuite|getTestCaseNames|findTestCases. #631

sallner opened this issue Apr 13, 2022 · 3 comments · Fixed by #647

Comments

@sallner
Copy link

sallner commented Apr 13, 2022

With the patch bpo-5846 three methods from the unittest module have been deprecated. It can be substituted by unittest.defaultTestLoader.loadTestsFromTestCase|getTestCaseNames|findTestCases. (zopefoundation/zope.security#84)

Would it be an option to include this fix in pyupgrade and would you accept such a fixer? This would help a lot with the whole range of zope.* packages.

@asottile
Copy link
Owner

there's already a unit test rewriter, it would just need to learn about these functions, would you like to contribute a patch?

@sallner
Copy link
Author

sallner commented Apr 13, 2022

Thank you for the hint. I can try that.

@cj81499
Copy link
Contributor

cj81499 commented Jun 4, 2022

Hey @asottile and @sallner. I took a shot at implementing this. Take a look when you get a chance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants