From: Serhiy Storchaka Date: Sun, 2 Oct 2016 18:16:28 +0000 (+0300) Subject: Moved Unicode C API related tests to separate test class. X-Git-Tag: v2.7.13rc1~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=317d350f9c535fff36f15e4d3b8adb3be222eebd;p=python Moved Unicode C API related tests to separate test class. --- diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 93224e17e9..0f2cf217be 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1665,6 +1665,13 @@ class UnicodeTest( self.assertEqual("%s" % u, u'__unicode__ overridden') self.assertEqual("{}".format(u), '__unicode__ overridden') + def test_free_after_iterating(self): + test_support.check_free_after_iterating(self, iter, unicode) + test_support.check_free_after_iterating(self, reversed, unicode) + + +class CAPITest(unittest.TestCase): + # Test PyUnicode_FromFormat() def test_from_format(self): test_support.import_module('ctypes') @@ -1857,11 +1864,6 @@ class UnicodeTest( unicode_encodedecimal(u"123" + s, "xmlcharrefreplace"), '123' + exp) - def test_free_after_iterating(self): - test_support.check_free_after_iterating(self, iter, unicode) - test_support.check_free_after_iterating(self, reversed, unicode) - - def test_main(): test_support.run_unittest(__name__)