testinggtk r244 - trunk/tests/gdk



Author: bjornl
Date: Wed Jun 25 21:01:47 2008
New Revision: 244
URL: http://svn.gnome.org/viewvc/testinggtk?rev=244&view=rev

Log:
Tests for the gtk.gdk.Pixbuf class

Added:
   trunk/tests/gdk/test_pixbuf.py

Added: trunk/tests/gdk/test_pixbuf.py
==============================================================================
--- (empty file)
+++ trunk/tests/gdk/test_pixbuf.py	Wed Jun 25 21:01:47 2008
@@ -0,0 +1,16 @@
+'''
+Tests for the ``gtk.gdk.Pixbuf`` class
+'''
+from gtk import gdk
+
+def test_save_to_callback():
+    '''
+    Ensure that the callback function is called in
+    ``save_to_callback``.
+    '''
+    called = [False]
+    def func(buf):
+        called[0] = True
+    pixbuf = gdk.Pixbuf(gdk.COLORSPACE_RGB, False, 8, 100, 100)
+    pixbuf.save_to_callback(func, 'jpeg')
+    assert called[0]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]