Py3 test case fix
authorStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:52:33 +0000 (13:52 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:52:33 +0000 (13:52 +0100)
tests/run/bufaccess.pyx

index d9f814f2608665a7b53d9ed106415ba45501ad59..89b0f3d4f982f9bb66daaaa991e075a6b25b1bf2 100644 (file)
@@ -1094,7 +1094,11 @@ cdef class MockBuffer:
             self.buffer = self.create_buffer(data)
             self.ndim = len(shape)
             self.suboffsets = NULL
-            
+
+        try:
+            format = format.encode('ASCII')
+        except AttributeError:
+            pass
         self.format = format
         self.len = len(data) * self.itemsize