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
This commit is contained in:
Zackery Spytz 2019-08-08 15:48:00 -06:00 committed by Miss Islington (bot)
parent f4e725f224
commit 10a0a09323
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
import copy
import parser
import warnings
with warnings.catch_warnings():
warnings.filterwarnings('ignore', 'The parser module is deprecated',
DeprecationWarning)
import parser
import pickle
import unittest
import operator