Commits

Lenard Lindstrom committed c70c2b7

Test PgObject_GetBuffer raises the correct exception: ref f05e97dd6fb9

Comments (0)

Files changed (1)

test/base_test.py

             v = BufferProxy(o)
             self.assertSame(v, o)
 
+    def test_PgObject_GetBuffer_exception(self):
+        # For consistency with surfarray
+        from pygame.bufferproxy import BufferProxy
+
+        bp = BufferProxy(1)
+        self.assertRaises(ValueError, getattr, bp, 'length')
+
     def not_init_assertions(self):
         self.assert_(not pygame.display.get_init(),
                      "display shouldn't be initialized" )