testinggtk r249 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r249 - trunk/tests
- Date: Wed, 25 Jun 2008 21:14:49 +0000 (UTC)
Author: bjornl
Date: Wed Jun 25 21:14:49 2008
New Revision: 249
URL: http://svn.gnome.org/viewvc/testinggtk?rev=249&view=rev
Log:
long and short invisible chars
Modified:
trunk/tests/test_entry.py
Modified: trunk/tests/test_entry.py
==============================================================================
--- trunk/tests/test_entry.py (original)
+++ trunk/tests/test_entry.py Wed Jun 25 21:14:49 2008
@@ -54,3 +54,27 @@
assert entry.get_invisible_char() == 'f'
entry.set_invisible_char('X')
assert entry.get_invisible_char() == 'X'
+
+def test_long_invisible_char():
+ '''
+ Ensure that a ``ValueError`` is raised when the argument to
+ ``set_invisible_char`` is more than 1 character long.
+ '''
+ entry = gtk.Entry()
+ try:
+ entry.set_invisible_char('foo')
+ assert False
+ except ValueError:
+ assert True
+
+def test_short_invisible_char():
+ '''
+ Ensure that a ``ValueError`` is raised when the argument to
+ ``set_invisible_char`` is an empty string.
+ '''
+ entry = gtk.Entry()
+ try:
+ entry.set_invisible_char('')
+ assert False
+ except ValueError:
+ assert True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]