[testinggtk] Attempts to create zero-size pixbufs should raise RuntimeError.



commit d16c9e351f9b4f0a52c2f2c518657114e3955220
Author: Björn Lindqvist <bjourne gmail com>
Date:   Sat Jun 6 22:17:43 2009 +0200

    Attempts to create zero-size pixbufs should raise RuntimeError.
---
 tests/gdk/test_pixbuf.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/gdk/test_pixbuf.py b/tests/gdk/test_pixbuf.py
index a60e430..1d73335 100644
--- a/tests/gdk/test_pixbuf.py
+++ b/tests/gdk/test_pixbuf.py
@@ -69,3 +69,15 @@ def test_save_to_callback_options_wrong():
     except TypeError:
         assert True
 
+def test_new_from_data_zero_size():
+    '''
+    Attempts to create zero-size pixbufs should raise RuntimeError.
+    
+    :bug: #584769
+    '''
+    try:
+        gdk.pixbuf_new_from_data('', gdk.COLORSPACE_RGB, False, 8, 0, 0, 0)
+        assert False
+    except RuntimeError:
+        assert True
+



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