testinggtk r363 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r363 - trunk/tests
- Date: Mon, 4 Aug 2008 21:32:01 +0000 (UTC)
Author: bjornl
Date: Mon Aug 4 21:32:01 2008
New Revision: 363
URL: http://svn.gnome.org/viewvc/testinggtk?rev=363&view=rev
Log:
New test for empty tooltips
Modified:
trunk/tests/test_widget.py
Modified: trunk/tests/test_widget.py
==============================================================================
--- trunk/tests/test_widget.py (original)
+++ trunk/tests/test_widget.py Mon Aug 4 21:32:01 2008
@@ -80,8 +80,23 @@
widget = gtk.Button()
widget.set_tooltip_text('foo')
assert widget.get_tooltip_text() == 'foo'
+ widget.set_tooltip_text('bar')
+ assert widget.get_tooltip_text() == 'bar'
+
+def test_set_empty_tooltip():
+ '''
+ Setting an empty string as the tooltip for a widget, unsets that
+ widgets tooltip.
+
+ :bug: #504456, #541399
+ '''
+ widget = gtk.Button()
+ widget.set_tooltip_text('hello')
+ assert widget.get_tooltip_text() == 'hello'
+ assert widget.get_has_tooltip()
widget.set_tooltip_text('')
- assert widget.get_tooltip_text() == ''
+ assert not widget.get_tooltip_text()
+ assert not widget.get_has_tooltip()
def test_get_has_tooltip():
'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]