File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change 1515import struct
1616import threading
1717import gc
18- import warnings
19-
20- def pickle_deprecated (testfunc ):
21- """ Run the test three times.
22- First, verify that a Deprecation Warning is raised.
23- Second, run normally but with DeprecationWarnings temporarily disabled.
24- Third, run with warnings promoted to errors.
25- """
26- def inner (self ):
27- with self .assertWarns (DeprecationWarning ):
28- testfunc (self )
29- with warnings .catch_warnings ():
30- warnings .simplefilter ("ignore" , category = DeprecationWarning )
31- testfunc (self )
32- with warnings .catch_warnings ():
33- warnings .simplefilter ("error" , category = DeprecationWarning )
34- with self .assertRaises ((DeprecationWarning , AssertionError , SystemError )):
35- testfunc (self )
36-
37- return inner
3818
3919maxsize = support .MAX_Py_ssize_t
4020minsize = - maxsize - 1
You can’t perform that action at this time.
0 commit comments