summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-26 14:39:04 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-26 14:39:04 (GMT)
commit39e360b02d1f6ae8f333c83d029ecef2bb7d28b2 (patch)
tree157dfca781d3e0ed6cf2a5f5baffad524de77f6e /Lib/ctypes
parent3d1e861d452fb7279d23b97f51ac80e0ba184229 (diff)
downloadcpython-39e360b02d1f6ae8f333c83d029ecef2bb7d28b2.zip
cpython-39e360b02d1f6ae8f333c83d029ecef2bb7d28b2.tar.gz
cpython-39e360b02d1f6ae8f333c83d029ecef2bb7d28b2.tar.bz2
fix failing test from rename
Diffstat (limited to 'Lib/ctypes')
-rw-r--r--Lib/ctypes/test/test_python_api.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/ctypes/test/test_python_api.py b/Lib/ctypes/test/test_python_api.py
index 8e8b6f7..674f9ab 100644
--- a/Lib/ctypes/test/test_python_api.py
+++ b/Lib/ctypes/test/test_python_api.py
@@ -17,21 +17,21 @@ else:
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