Skip to content

Commit 10a0a09

Browse files
ZackerySpytzmiss-islington
authored andcommitted
bpo-37268: test_parser fails when run with -Werror (GH-15183)
Use warnings.filterwarnings() when importing the deprecated parser module. @pablogsal https://bugs.python.org/issue37268 Automerge-Triggered-By: @pablogsal
1 parent f4e725f commit 10a0a09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_parser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import copy
2-
import parser
2+
import warnings
3+
with warnings.catch_warnings():
4+
warnings.filterwarnings('ignore', 'The parser module is deprecated',
5+
DeprecationWarning)
6+
import parser
37
import pickle
48
import unittest
59
import operator

0 commit comments

Comments
 (0)