From 329297f101a6135c103b5d2d8cad9ec7527605af Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 24 Aug 2005 17:29:09 +0000 Subject: Add test for Table.attach which takes uint arguments. 2005-08-24 Johan Dahlin * 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. --- tests/test_conversion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/test_conversion.py') 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() -- cgit