diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2020-10-06 11:59:17 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2020-10-06 12:01:19 +0200 |
commit | c945c99fbadb4496ff0fc01d42efd786abf5fba8 (patch) | |
tree | 76f7fdd6d3928fb36f1cdb78f78ad2b56df281f6 /tests | |
parent | 2913e72d85269d6b307dc054946a88cbba6707de (diff) | |
download | gobject-introspection-c945c99fbadb4496ff0fc01d42efd786abf5fba8.tar.gz |
Replace PyUnicode_GET_SIZE() usage with PyUnicode_GET_LENGTH()
PyUnicode_GET_SIZE() is deprecated and actually wrong in case wchar_t
is not 4 bytes and high code points, use PyUnicode_GET_LENGTH() instead.
Fixes a deprecation warning with Python 3.9
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_everything.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_everything.py b/tests/test_everything.py index ba1b0629..968cf785 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -359,6 +359,7 @@ class TestEverything(unittest.TestCase): def test_unichar(self): self.assertEqual("c", Everything.test_unichar("c")) + self.assertEqual(chr(sys.maxunicode), Everything.test_unichar(chr(sys.maxunicode))) self.assertEqual(u"♥", Everything.test_unichar(u"♥")) self.assertRaises(TypeError, Everything.test_unichar, "") |