[Python-checkins] bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)

Karthikeyan Singaravelan webhook-mailer at python.org
Fri Jul 31 06:51:15 EDT 2020


https://github.com/python/cpython/commit/cadda52d974937069eeebea1cca4229e2bd400df
commit: cadda52d974937069eeebea1cca4229e2bd400df
branch: master
author: Karthikeyan Singaravelan <tir.karthi at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-07-31T16:20:48+05:30
summary:

bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)

files:
M Lib/test/test_lib2to3.py

diff --git a/Lib/test/test_lib2to3.py b/Lib/test/test_lib2to3.py
index 5eaa5164d490a..159a8387e4e97 100644
--- a/Lib/test/test_lib2to3.py
+++ b/Lib/test/test_lib2to3.py
@@ -1,5 +1,8 @@
-from lib2to3.tests import load_tests
 import unittest
+from test.support.warnings_helper import check_warnings
+
+with check_warnings(("", PendingDeprecationWarning)):
+    from lib2to3.tests import load_tests
 
 if __name__ == '__main__':
     unittest.main()



More information about the Python-checkins mailing list