diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-02-22 13:11:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 13:11:48 (GMT) |
commit | 91a639a094978882caef91915c932fbb2fc347de (patch) | |
tree | 29ee9246d022b40a529c881e8deb0d6503b4d993 /Lib/test/test_unicode.py | |
parent | 5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120 (diff) | |
download | cpython-91a639a094978882caef91915c932fbb2fc347de.zip cpython-91a639a094978882caef91915c932fbb2fc347de.tar.gz cpython-91a639a094978882caef91915c932fbb2fc347de.tar.bz2 |
bpo-36346: Emit DeprecationWarning for PyArg_Parse() with 'u' or 'Z'. (GH-20927)
Emit DeprecationWarning when PyArg_Parse*() is called with 'u', 'Z' format.
See PEP 623.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index df8f2c9..2626be6 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -2368,12 +2368,14 @@ class UnicodeTest(string_tests.CommonTest, text = 'a' * length + 'b' # fill wstr internal field - abc = getargs_u(text) + with self.assertWarns(DeprecationWarning): + abc = getargs_u(text) self.assertEqual(abc, text) # resize text: wstr field must be cleared and then recomputed text += 'c' - abcdef = getargs_u(text) + with self.assertWarns(DeprecationWarning): + abcdef = getargs_u(text) self.assertNotEqual(abc, abcdef) self.assertEqual(abcdef, text) |