Mailing List Archive

bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)
https://github.com/python/cpython/commit/cadda52d974937069eeebea1cca4229e2bd400df
commit: cadda52d974937069eeebea1cca4229e2bd400df
branch: master
author: Karthikeyan Singaravelan <tir.karthi@gmail.com>
committer: GitHub <noreply@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()

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins