Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce07de9

Browse files
authored
[3.11]GH-93481: Suppress expected deprecation warning in test_pyclbr (GH-93483) (GH-93601)
(cherry picked from commitf8eae6f)Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent68aae80 commitce07de9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎Lib/test/test_pyclbr.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
importpyclbr
1010
fromunittestimportTestCase,mainasunittest_main
1111
fromtest.test_importlibimportutilastest_importlib_util
12+
importwarnings
1213

1314

1415
StaticMethodType=type(staticmethod(lambda:None))
@@ -218,9 +219,13 @@ def test_others(self):
218219

219220
# These were once some of the longest modules.
220221
cm('random',ignore=('Random',))# from _random import Random as CoreGenerator
221-
cm('cgi',ignore=('log',))# set with = in module
222+
withwarnings.catch_warnings():
223+
warnings.simplefilter('ignore',DeprecationWarning)
224+
cm('cgi',ignore=('log',))# set with = in module
222225
cm('pickle',ignore=('partial','PickleBuffer'))
223-
cm('sre_parse',ignore=('dump','groups','pos'))# from sre_constants import *; property
226+
withwarnings.catch_warnings():
227+
warnings.simplefilter('ignore',DeprecationWarning)
228+
cm('sre_parse',ignore=('dump','groups','pos'))# from sre_constants import *; property
224229
cm(
225230
'pdb',
226231
# pyclbr does not handle elegantly `typing` or properties

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp