diff options
author | Johan Dahlin <jdahlin@async.com.br> | 2005-08-24 17:29:09 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2005-08-24 17:29:09 +0000 |
commit | c06622925f95af6c9e2e18cc62d720d5016569bf (patch) | |
tree | dae231615df63cb81f62885b4996ccf4d86eb96d /tests | |
parent | dcadc7509b471fb1c976d81a50e4d309065f5914 (diff) | |
download | pygtk-c06622925f95af6c9e2e18cc62d720d5016569bf.tar.gz |
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')
-rw-r--r-- | tests/test_conversion.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_conversion.py b/tests/test_conversion.py index 72dc5c42..373ab9d1 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() |