diff options
author | Thomas Heller <theller@ctypes.org> | 2007-07-12 19:45:20 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-07-12 19:45:20 (GMT) |
commit | d68d131d29380af5a4adffb791b80049dc737c13 (patch) | |
tree | 2a6684dc4f2213a9933e295a4b26b75d19fb12d1 | |
parent | f0d8b6eee9762eba3e3c075ddba1c5542e0e64b9 (diff) | |
download | cpython-d68d131d29380af5a4adffb791b80049dc737c13.zip cpython-d68d131d29380af5a4adffb791b80049dc737c13.tar.gz cpython-d68d131d29380af5a4adffb791b80049dc737c13.tar.bz2 |
Simple fixes.
-rw-r--r-- | Lib/ctypes/test/test_memfunctions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/ctypes/test/test_memfunctions.py b/Lib/ctypes/test/test_memfunctions.py index aef7a73..fcc888b 100644 --- a/Lib/ctypes/test/test_memfunctions.py +++ b/Lib/ctypes/test/test_memfunctions.py @@ -7,7 +7,7 @@ class MemFunctionsTest(unittest.TestCase): # large buffers apparently increase the chance that the memory # is allocated in high address space. a = create_string_buffer(1000000) - p = "Hello, World" + p = b"Hello, World" result = memmove(a, p, len(p)) self.failUnlessEqual(a.value, "Hello, World") @@ -32,14 +32,14 @@ class MemFunctionsTest(unittest.TestCase): [97, 98, 99, 100, 101, 102, 0]) def test_string_at(self): - s = string_at("foo bar") + s = string_at(b"foo bar") # XXX The following may be wrong, depending on how Python # manages string instances self.failUnlessEqual(2, sys.getrefcount(s)) self.failUnless(s, "foo bar") - self.failUnlessEqual(string_at("foo bar", 8), "foo bar\0") - self.failUnlessEqual(string_at("foo bar", 3), "foo") + self.failUnlessEqual(string_at(b"foo bar", 8), "foo bar\0") + self.failUnlessEqual(string_at(b"foo bar", 3), "foo") try: create_unicode_buffer |