testinggtk r379 - trunk/tests/gdk
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r379 - trunk/tests/gdk
- Date: Wed, 20 Aug 2008 19:43:27 +0000 (UTC)
Author: bjornl
Date: Wed Aug 20 19:43:27 2008
New Revision: 379
URL: http://svn.gnome.org/viewvc/testinggtk?rev=379&view=rev
Log:
Check that save_to_callback() can be called with user_data = None
Modified:
trunk/tests/gdk/test_pixbuf.py
Modified: trunk/tests/gdk/test_pixbuf.py
==============================================================================
--- trunk/tests/gdk/test_pixbuf.py (original)
+++ trunk/tests/gdk/test_pixbuf.py Wed Aug 20 19:43:27 2008
@@ -35,6 +35,14 @@
pixbuf = gdk.Pixbuf(gdk.COLORSPACE_RGB, False, 8, 100, 100)
pixbuf.save('foo', 'png', options = None)
+def test_save_to_callback_user_data_none():
+ '''
+ Ensure that ``None`` can be specified explicitly as the
+ ``user_data`` argument to ``save_to_callback``.
+ '''
+ pixbuf = gdk.Pixbuf(gdk.COLORSPACE_RGB, False, 8, 100, 100)
+ pixbuf.save_to_callback(lambda *args: args, 'jpeg', user_data = None)
+
def test_save_options_wrong():
'''
Ensure that a ``TypeError`` is raised if the ``options`` argument
@@ -58,3 +66,4 @@
assert False
except TypeError:
assert True
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]