[pygobject] pygtkcompat test: Properly clean up PixbufLoader
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] pygtkcompat test: Properly clean up PixbufLoader
- Date: Wed, 21 Mar 2012 14:24:43 +0000 (UTC)
commit 38aecc481741fd3a319a76a0ec8bf5329a483876
Author: Martin Pitt <martin pitt ubuntu com>
Date: Wed Mar 21 15:21:02 2012 +0100
pygtkcompat test: Properly clean up PixbufLoader
Tests currently give
(runtests.py:15072): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
Fix this by calling close().
tests/test_pygtkcompat.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_pygtkcompat.py b/tests/test_pygtkcompat.py
index 2567f68..b9765c3 100644
--- a/tests/test_pygtkcompat.py
+++ b/tests/test_pygtkcompat.py
@@ -74,7 +74,8 @@ class TestGTKCompat(unittest.TestCase):
gtk.gdk.Pixbuf()
def testPixbufLoader(self):
- gtk.gdk.PixbufLoader('png')
+ loader = gtk.gdk.PixbufLoader('png')
+ loader.close()
def testGdkWindow(self):
w = gtk.Window()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]