bpo-42882: Add test_embed.test_unicode_id_init() (GH-24198)

Test that _PyUnicode_FromId() works when Python is initialized
multiples times.
This commit is contained in:
Victor Stinner 2021-01-12 11:26:26 +01:00 committed by GitHub
parent 44bf57aca6
commit 11d13e83ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 0 deletions

View file

@ -1472,5 +1472,11 @@ class AuditingTests(EmbeddingTestsMixin, unittest.TestCase):
timeout=support.SHORT_TIMEOUT,
returncode=1)
class MiscTests(EmbeddingTestsMixin, unittest.TestCase):
def test_unicode_id_init(self):
# bpo-42882: Test that _PyUnicode_FromId() works
# when Python is initialized multiples times.
self.run_embedded_interpreter("test_unicode_id_init")
if __name__ == "__main__":
unittest.main()