testinggtk r436 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r436 - trunk/tests
- Date: Tue, 9 Sep 2008 18:55:32 +0000 (UTC)
Author: bjornl
Date: Tue Sep 9 18:55:32 2008
New Revision: 436
URL: http://svn.gnome.org/viewvc/testinggtk?rev=436&view=rev
Log:
Make the test_blah tc useful, by making it test for bug 438114
Modified:
trunk/tests/test_scrolledwindow.py
Modified: trunk/tests/test_scrolledwindow.py
==============================================================================
--- trunk/tests/test_scrolledwindow.py (original)
+++ trunk/tests/test_scrolledwindow.py Tue Sep 9 18:55:32 2008
@@ -1,6 +1,7 @@
'''
Tests for the ``gtk.ScrolledWindow`` class.
'''
+import gobject
import gtk
import utils
@@ -34,14 +35,20 @@
scroll.set_property('hadjustment', None)
scroll.set_property('vadjustment', None)
-def test_blaha():
- import gobject
+ utils fail_on_warnings
+def test_subclass_init_calls_add():
+ '''
+ Ensure that adding items to a scrolled window within a subclass
+ __init__ method works.
+
+ :bug: #438114
+ '''
class MyScrolledWindow(gtk.ScrolledWindow):
- pass
+ def __init__(self):
+ super(MyScrolledWindow, self).__init__()
+ self.add(gtk.TextView())
gobject.type_register(MyScrolledWindow)
-
- scroll = MyScrolledWindow()
- print scroll.get_hscrollbar()
+ gobject.new(MyScrolledWindow)
@utils.pass_on_warnings
def test_add_non_scrollable_widget():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]