testinggtk r226 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r226 - trunk/tests
- Date: Sun, 22 Jun 2008 04:09:56 +0000 (UTC)
Author: bjornl
Date: Sun Jun 22 04:09:56 2008
New Revision: 226
URL: http://svn.gnome.org/viewvc/testinggtk?rev=226&view=rev
Log:
Test for the insert-text signal
Modified:
trunk/tests/test_entry.py
Modified: trunk/tests/test_entry.py
==============================================================================
--- trunk/tests/test_entry.py (original)
+++ trunk/tests/test_entry.py Sun Jun 22 04:09:56 2008
@@ -26,3 +26,16 @@
entry.set_text('Hello, World!')
entry.delete_text(0, -1)
assert entry.get_text() == ''
+
+def test_insert_text_signal():
+ '''
+ Ensure that the ``insert-text`` signal is emitted when the text in
+ a ``gtk.Entry`` is changed.
+ '''
+ emitted = [False]
+ def insert_text_cb(*args):
+ emitted[0] = True
+ entry = gtk.Entry()
+ entry.connect('insert-text', insert_text_cb)
+ entry.set_text('foo')
+ assert emitted[0]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]