[Python-3000-checkins] r63689 - python/branches/py3k/Lib/ctypes/test/test_python_api.py

benjamin.peterson python-3000-checkins at python.org
Mon May 26 16:39:04 CEST 2008


Author: benjamin.peterson
Date: Mon May 26 16:39:04 2008
New Revision: 63689

Log:
fix failing test from rename


Modified:
   python/branches/py3k/Lib/ctypes/test/test_python_api.py

Modified: python/branches/py3k/Lib/ctypes/test/test_python_api.py
==============================================================================
--- python/branches/py3k/Lib/ctypes/test/test_python_api.py	(original)
+++ python/branches/py3k/Lib/ctypes/test/test_python_api.py	Mon May 26 16:39:04 2008
@@ -17,21 +17,21 @@
 
 class PythonAPITestCase(unittest.TestCase):
 
-    def test_PyString_FromStringAndSize(self):
-        PyString_FromStringAndSize = pythonapi.PyString_FromStringAndSize
+    def test_PyBytes_FromStringAndSize(self):
+        PyBytes_FromStringAndSize = pythonapi.PyBytes_FromStringAndSize
 
-        PyString_FromStringAndSize.restype = py_object
-        PyString_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t
+        PyBytes_FromStringAndSize.restype = py_object
+        PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t
 
-        self.failUnlessEqual(PyString_FromStringAndSize(b"abcdefghi", 3), b"abc")
+        self.failUnlessEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc")
 
     def test_PyString_FromString(self):
-        pythonapi.PyString_FromString.restype = py_object
-        pythonapi.PyString_FromString.argtypes = (c_char_p,)
+        pythonapi.PyBytes_FromString.restype = py_object
+        pythonapi.PyBytes_FromString.argtypes = (c_char_p,)
 
         s = b"abc"
         refcnt = grc(s)
-        pyob = pythonapi.PyString_FromString(s)
+        pyob = pythonapi.PyBytes_FromString(s)
         self.failUnlessEqual(grc(s), refcnt)
         self.failUnlessEqual(s, pyob)
         del pyob


More information about the Python-3000-checkins mailing list