[Python-checkins] cpython (2.7): Moved Unicode C API related tests to separate test class.

serhiy.storchaka python-checkins at python.org
Sun Oct 2 14:31:22 EDT 2016


https://hg.python.org/cpython/rev/a0b9c4f98573
changeset:   104251:a0b9c4f98573
branch:      2.7
parent:      104236:29a658d47ae8
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun Oct 02 21:16:28 2016 +0300
summary:
  Moved Unicode C API related tests to separate test class.

files:
  Lib/test/test_unicode.py |  12 +++++++-----
  1 files changed, 7 insertions(+), 5 deletions(-)


diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1665,6 +1665,13 @@
         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 @@
                     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__)
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list