gh-104012: Ensure test_calendar.CalendarTestCase.test_deprecation_warning consistently passes#104014
Merged
AlexWaygood merged 2 commits intopython:mainfrom Apr 30, 2023
Merged
Conversation
Lib/test/test_calendar.py
Outdated
| class CalendarTestCase(unittest.TestCase): | ||
|
|
||
| def test_deprecation_warning(self): | ||
| warnings.resetwarnings() |
Member
There was a problem hiding this comment.
Why aren't we using self.assertWarns?
Member
Author
There was a problem hiding this comment.
I don't have a reason not to use self.assertWarns. I just made the minimal change to fix the issue. Looking through the previous PR, it doesn't look like using assertWarns(Regex) was suggested, so the contributor may not have been aware of it.
Member
There was a problem hiding this comment.
Let's switch to assertWarnsRegex, then we don't have to do all this manual manipulation of the warnings machinery.
JelleZijlstra
approved these changes
Apr 30, 2023
carljm
added a commit
to carljm/cpython
that referenced
this pull request
May 1, 2023
* main: (26 commits) pythongh-104028: Reduce object creation while calling callback function from gc (pythongh-104030) pythongh-104036: Fix direct invocation of test_typing (python#104037) pythongh-102213: Optimize the performance of `__getattr__` (pythonGH-103761) pythongh-103895: Improve how invalid `Exception.__notes__` are displayed (python#103897) Adjust expression from `==` to `!=` in alignment with the meaning of the paragraph. (pythonGH-104021) pythongh-88496: Fix IDLE test hang on macOS (python#104025) Improve int test coverage (python#104024) pythongh-88773: Added teleport method to Turtle library (python#103974) pythongh-104015: Fix direct invocation of `test_dataclasses` (python#104017) pythongh-104012: Ensure test_calendar.CalendarTestCase.test_deprecation_warning consistently passes (python#104014) pythongh-103977: compile re expressions in platform.py only if required (python#103981) pythongh-98003: Inline call frames for CALL_FUNCTION_EX (pythonGH-98004) Replace Netlify with Read the Docs build previews (python#103843) Update name in acknowledgements and add mailmap (python#103696) pythongh-82054: allow test runner to split test_asyncio to execute in parallel by sharding. (python#103927) Remove non-existing tools from Sundry skiplist (python#103991) pythongh-103793: Defer formatting task name (python#103767) pythongh-87092: change assembler to use instruction sequence instead of CFG (python#103933) pythongh-103636: issue warning for deprecated calendar constants (python#103833) Various small fixes to dis docs (python#103923) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #104012
test_calendarfails on Azure Pipelines #104012