Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b05cd49

Browse files
committed
Ignore more deprecation warnings.
1 parent 3c14efe commit b05cd49

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/test/test___all__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
from test_support import verify, verbose
22
import sys
3+
import warnings
4+
5+
warnings.filterwarnings("ignore", ".* 'pre' .*", DeprecationWarning)
6+
warnings.filterwarnings("ignore", ".* regsub .*", DeprecationWarning)
7+
warnings.filterwarnings("ignore", ".* statcache .*", DeprecationWarning)
38

49
def check_all(modname):
510
names = {}
@@ -110,7 +115,7 @@ def check_all(modname):
110115
check_all("poplib")
111116
check_all("posixpath")
112117
check_all("pprint")
113-
check_all("pre")
118+
check_all("pre") # deprecated
114119
check_all("profile")
115120
check_all("pstats")
116121
check_all("pty")
@@ -120,9 +125,6 @@ def check_all(modname):
120125
check_all("random")
121126
check_all("re")
122127
check_all("reconvert")
123-
import warnings
124-
warnings.filterwarnings("ignore", ".* regsub .*", DeprecationWarning, "regsub",
125-
append=1)
126128
check_all("regsub")
127129
check_all("repr")
128130
check_all("rexec")

0 commit comments

Comments
 (0)