testinggtk r215 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r215 - trunk/tests
- Date: Sat, 21 Jun 2008 23:12:34 +0000 (UTC)
Author: bjornl
Date: Sat Jun 21 23:12:34 2008
New Revision: 215
URL: http://svn.gnome.org/viewvc/testinggtk?rev=215&view=rev
Log:
Sore more gtk.Plug tests
Modified:
trunk/tests/test_plug.py
Modified: trunk/tests/test_plug.py
==============================================================================
--- trunk/tests/test_plug.py (original)
+++ trunk/tests/test_plug.py Sat Jun 21 23:12:34 2008
@@ -11,8 +11,24 @@
plug = gtk.Plug(0L)
assert plug.get_id() == 0
+def test_overflowing_socket_id():
+ try:
+ plug = gtk.Plug(123456789123456789123456789)
+ assert False
+ except OverflowError:
+ assert True
+
def test_create_with_display():
plug = gtk.Plug(socket_id = 0L, display = gdk.display_get_default())
+ print plug.get_id()
+ assert plug.get_id() == 0
+
+def test_create_without_socket_id():
+ try:
+ gtk.Plug(display = gdk.display_get_default())
+ assert False
+ except TypeError:
+ assert True
def test_create_using_integer():
'''
@@ -23,3 +39,4 @@
'''
plug = gtk.Plug(0)
assert isinstance(plug, gtk.Plug)
+ assert plug.get_id() == 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]