testinggtk r385 - trunk/tests



Author: bjornl
Date: Sat Aug 23 17:24:20 2008
New Revision: 385
URL: http://svn.gnome.org/viewvc/testinggtk?rev=385&view=rev

Log:
Add test exercising setting and getting digits

Modified:
   trunk/tests/test_spinbutton.py

Modified: trunk/tests/test_spinbutton.py
==============================================================================
--- trunk/tests/test_spinbutton.py	(original)
+++ trunk/tests/test_spinbutton.py	Sat Aug 23 17:24:20 2008
@@ -22,6 +22,15 @@
     win.show_all()
     assert len(win.window.get_children()) == 1
 
+def test_set_get_digits():
+    adj = gtk.Adjustment(0, 0, 0, 0, 0, 0)
+    spin = gtk.SpinButton(adj, 1, 2)
+    assert spin.get_digits() == 2.0
+    spin.set_digits(33)
+    assert spin.get_digits() == 33
+    spin.set_digits(0)
+    assert spin.get_digits() == 0
+
 def test_value_changed_signal():
     '''
     Ensure that the ``value-changed`` signal is properly emitted on a



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