diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-08-25 16:18:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 16:18:24 (GMT) |
commit | 0eb6d87304b5ca8ed84e5c885e2cef3eb24a3e3a (patch) | |
tree | 548ff5c18a1d408e12074b09d7611a094cfb5d19 /Lib/test/test_unicode.py | |
parent | 22621907eea3f0ed4ccf5a69bcef70a70396b36b (diff) | |
download | cpython-0eb6d87304b5ca8ed84e5c885e2cef3eb24a3e3a.zip cpython-0eb6d87304b5ca8ed84e5c885e2cef3eb24a3e3a.tar.gz cpython-0eb6d87304b5ca8ed84e5c885e2cef3eb24a3e3a.tar.bz2 |
[3.12] gh-80527: Change support.requires_legacy_unicode_capi() (GH-108438) (#108446)
gh-80527: Change support.requires_legacy_unicode_capi() (GH-108438)
The decorator now requires to be called with parenthesis:
@support.requires_legacy_unicode_capi()
instead of:
@support.requires_legacy_unicode_capi
The implementation now only imports _testcapi when the decorator is
called, so "import test.support" no longer imports the _testcapi
extension.
(cherry picked from commit 995f4c48e11349fbfb9233e02b732d4534d3008e)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 4ebbb9d..2fd66c9 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -814,7 +814,7 @@ class UnicodeTest(string_tests.CommonTest, self.assertFalse("0".isidentifier()) @support.cpython_only - @support.requires_legacy_unicode_capi + @support.requires_legacy_unicode_capi() @unittest.skipIf(_testcapi is None, 'need _testcapi module') def test_isidentifier_legacy(self): u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊' @@ -2491,7 +2491,7 @@ class UnicodeTest(string_tests.CommonTest, self.assertEqual(len(args), 1) @support.cpython_only - @support.requires_legacy_unicode_capi + @support.requires_legacy_unicode_capi() @unittest.skipIf(_testcapi is None, 'need _testcapi module') def test_resize(self): for length in range(1, 100, 7): |