Skip to content

Commit

Permalink
pythonGH-93481: Suppress expected deprecation warning in test_pyclbr
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Jun 3, 2022
1 parent 1713ff0 commit 68cb7df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Lib/test/test_pyclbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pyclbr
from unittest import TestCase, main as unittest_main
from test.test_importlib import util as test_importlib_util
import warnings


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

# These were once some of the longest modules.
cm('random', ignore=('Random',)) # from _random import Random as CoreGenerator
cm('cgi', ignore=('log',)) # set with = in module
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
cm('cgi', ignore=('log',)) # set with = in module
cm('pickle', ignore=('partial', 'PickleBuffer'))
cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property
cm(
'pdb',
# pyclbr does not handle elegantly `typing` or properties
Expand Down

0 comments on commit 68cb7df

Please sign in to comment.