def test_buffer_unmap_invalidates(self): point = dtype([('position', pos), ('UV', uv)]) buf = Buffer() buf.target = GL.GL_ARRAY_BUFFER buf[...] = numpy.zeros((20, 5), dtype=point) m = buf.map() buf.unmap() with self.assertRaises(IndexError): m[0] with self.assertRaises(IndexError): m[0] = 1