testinggtk r439 - trunk/tests/gdk
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r439 - trunk/tests/gdk
- Date: Tue, 9 Sep 2008 20:42:59 +0000 (UTC)
Author: bjornl
Date: Tue Sep 9 20:42:59 2008
New Revision: 439
URL: http://svn.gnome.org/viewvc/testinggtk?rev=439&view=rev
Log:
Tests for the gdk.Event class
Added:
trunk/tests/gdk/test_event.py
Added: trunk/tests/gdk/test_event.py
==============================================================================
--- (empty file)
+++ trunk/tests/gdk/test_event.py Tue Sep 9 20:42:59 2008
@@ -0,0 +1,21 @@
+'''
+Tests for the ``gdk.Event`` class.
+'''
+from gtk import gdk
+
+def test_set_int_coordinate():
+ '''
+ Ensure that setting the x or y attribute of a ``gdk.Event`` to an
+ integer value results in a TypeError.
+ '''
+ ev = gdk.Event(gdk.MOTION_NOTIFY)
+ try:
+ ev.x = 10
+ assert False
+ except TypeError:
+ assert True
+ try:
+ ev.y = 10
+ assert False
+ except TypeError:
+ assert True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]