Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ce3d2214
Commit
ce3d2214
authored
Apr 01, 2009
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_warnings ironically had a single test that was not protecting the warnings
filter and was resetting it.
parent
2da4d628
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
Lib/test/test_warnings.py
Lib/test/test_warnings.py
+8
-8
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/test_warnings.py
View file @
ce3d2214
...
...
@@ -460,6 +460,7 @@ class _WarningsTests(BaseTest):
self
.
failUnless
(
text
in
result
)
def
test_showwarning_not_callable
(
self
):
with
original_warnings
.
catch_warnings
(
module
=
self
.
module
):
self
.
module
.
filterwarnings
(
"always"
,
category
=
UserWarning
)
old_showwarning
=
self
.
module
.
showwarning
self
.
module
.
showwarning
=
23
...
...
@@ -467,7 +468,6 @@ class _WarningsTests(BaseTest):
self
.
assertRaises
(
TypeError
,
self
.
module
.
warn
,
"Warning!"
)
finally
:
self
.
module
.
showwarning
=
old_showwarning
self
.
module
.
resetwarnings
()
def
test_show_warning_output
(
self
):
# With showarning() missing, make sure that output is okay.
...
...
Misc/NEWS
View file @
ce3d2214
...
...
@@ -730,6 +730,8 @@ Extension Modules
Tests
-----
- Fix test_warnings to no longer reset the warnings filter.
- Fix test_logging to no longer reset the warnings filter.
- Issue #5635: Fix running test_sys with tracing enabled.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment