summaryrefslogtreecommitdiffstats
path: root/tests/test_conversion.py
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@async.com.br>2005-08-24 17:29:09 +0000
committerJohan Dahlin <johan@src.gnome.org>2005-08-24 17:29:09 +0000
commit329297f101a6135c103b5d2d8cad9ec7527605af (patch)
tree42f61d3a80fc7f5ea31f4883152637d674a0e633 /tests/test_conversion.py
parentd9b0169ad2b312d0776b3a2a03d93e8d91049f75 (diff)
downloadpygobject-329297f101a6135c103b5d2d8cad9ec7527605af.tar.gz
pygobject-329297f101a6135c103b5d2d8cad9ec7527605af.tar.xz
pygobject-329297f101a6135c103b5d2d8cad9ec7527605af.zip
Add test for Table.attach which takes uint arguments.
2005-08-24 Johan Dahlin <jdahlin@async.com.br> * tests/test_conversion.py (Tests.testUIntArg): Add test for Table.attach which takes uint arguments. * codegen/argtypes.py (UIntArg.write_param): One more take on fixing #300012, this time unsigned int conversion, patch by Gustavo.
Diffstat (limited to 'tests/test_conversion.py')
-rw-r--r--tests/test_conversion.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_conversion.py b/tests/test_conversion.py
index 72dc5c4..373ab9d 100644
--- a/tests/test_conversion.py
+++ b/tests/test_conversion.py
@@ -1,5 +1,7 @@
# -*- Mode: Python -*-
+import sys
+
import unittest
from common import gtk, gobject
@@ -69,5 +71,15 @@ class Tests(unittest.TestCase):
c = gtk.gdk.Color(pixel=0xffffffffL)
self.assertEqual(c.pixel, 0xffffffffL)
+ def testUIntArg(self):
+ child = gtk.DrawingArea()
+ table = gtk.Table(2, 2, False)
+ table.attach(child, 1, 2, 0, 1, ypadding=2)
+ self.assertEqual(table.child_get_property(child, 'y-padding'), 2)
+
+ child = gtk.DrawingArea()
+ table.attach(child, 1, 2, 0, 1, ypadding=2L)
+ self.assertEqual(table.child_get_property(child, 'y-padding'), 2)
+
if __name__ == '__main__':
unittest.main()