File tree 1 file changed +0
-20
lines changed 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change 15
15
import struct
16
16
import threading
17
17
import 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
38
18
39
19
maxsize = support .MAX_Py_ssize_t
40
20
minsize = - maxsize - 1
You can’t perform that action at this time.
0 commit comments