]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-115198: Fix test_check_metadata_deprecation in test_distutils (#115200)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 9 Feb 2024 23:23:29 +0000 (01:23 +0200)
committerGitHub <noreply@github.com>
Fri, 9 Feb 2024 23:23:29 +0000 (18:23 -0500)
* [3.11] gh-115198: Fix test_check_metadata_deprecation in test_distutils

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/distutils/tests/test_register.py
Misc/NEWS.d/next/Tests/2024-02-09-10-59-17.gh-issue-115198.1JP6LG.rst [new file with mode: 0644]

index 33f9443358ff271b86cf518de37463e78080a3fe..986392cf92037d24805754ca15333329427a4eec 100644 (file)
@@ -291,6 +291,8 @@ class RegisterTestCase(BasePyPIRCCommandTestCase):
         cmd = self._get_cmd()
         with check_warnings() as w:
             warnings.simplefilter("always")
+            warnings.filterwarnings("ignore", ".*OptionParser class will be replaced.*")
+            warnings.filterwarnings("ignore", ".*Option class will be removed.*")
             cmd.check_metadata()
             self.assertEqual(len(w.warnings), 1)
 
diff --git a/Misc/NEWS.d/next/Tests/2024-02-09-10-59-17.gh-issue-115198.1JP6LG.rst b/Misc/NEWS.d/next/Tests/2024-02-09-10-59-17.gh-issue-115198.1JP6LG.rst
new file mode 100644 (file)
index 0000000..2ad92f4
--- /dev/null
@@ -0,0 +1 @@
+Fix test_check_metadata_deprecate in distutils tests with a newer Docutils.