GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — bpo-5846: Deprecate obsolete methods in `unittest` by erlend-aasland · Pull Request #28299 · python/cpython Conversation
|
|
Replaces GH-20400. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am working on a patch which gets rid of uses of obsolete functions. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I had to adapt |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This reverts commit d978b17.
Sync with main bco. python#28303
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Are all tests warning-free?
If these functions are not used in unittest tests, add special tests, catch DeprecationWarning and check the filename attribute (to ensure that the stacklevel is correct).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| _TextTestResult = TextTestResult | ||
|
|
||
| from .loader import ( | ||
| makeSuite as _makeSuite, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why not add deprecations when they are defined?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
IIUC, it is the "shortcuts" that are deprecated, not the methods themselves. Should I deprecate the undocumented unittest.TestLoader.makeSuite and unittest.TestLoader.findTestCases as well?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There are no unittest.TestLoader.makeSuite and unittest.TestLoader.findTestCases.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant unittest.loader, not unittest.TestLoader:
>>> import unittest
>>> unittest.loader.makeSuite
<function makeSuite at 0x10be0e2a0>
>>> unittest.loader.findTestCases
<function findTestCases at 0x10be0e340>
>>>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for reviewing and merging, @serhiy-storchaka and @ambv! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
See python/cpython#28299 loadTestsFromTestCase() is available since Python 2.7 at least.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.