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

Skip to content

Commit a7c2b30

Browse files
committed
Since xmllib is deprecated now, suppress the DeprecationWarning its test
module necessarily raises.
1 parent b05cd49 commit a7c2b30

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_xmllib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
<greeting>Hello, world!</greeting>
1414
"""
1515

16+
import warnings
17+
warnings.filterwarnings("ignore", ".* xmllib .* obsolete.*",
18+
DeprecationWarning)
19+
del warnings
20+
1621
import test_support
1722
import unittest
1823
import xmllib
1924

20-
2125
class XMLParserTestCase(unittest.TestCase):
2226

2327
def test_simple(self):

0 commit comments

Comments
 (0)