summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Pogonyshev <paulp@src.gnome.org>2007-08-20 19:37:45 +0000
committerPaul Pogonyshev <paulp@src.gnome.org>2007-08-20 19:37:45 +0000
commitc818064624b530bbb3f2dc46f91c2378b6f515c8 (patch)
tree261d33df1dfd5e97b85d5ccebaeaa38d7ca9ca35 /tests
parent3234935986ebeee00c89a64e7fd5b6e6f40cde78 (diff)
downloadpygtk-c818064624b530bbb3f2dc46f91c2378b6f515c8.tar.gz
Allow to set gtk.Bin.child in subclasses.
svn path=/trunk/; revision=2882
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/test_bin.py18
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5c259064..27ad44be 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -3,6 +3,7 @@ EXTRA_DIST = $(tests) common.py runtests.py testmodule.py leak.glade
tests = \
test_actiongroup.py \
test_api.py \
+ test_bin.py \
test_container.py
test_conversion.py \
test_dialog.py \
diff --git a/tests/test_bin.py b/tests/test_bin.py
new file mode 100644
index 00000000..f7186fc0
--- /dev/null
+++ b/tests/test_bin.py
@@ -0,0 +1,18 @@
+import unittest
+
+from common import gtk
+
+class MyBin(gtk.Bin):
+ __gtype_name__ = 'MyBin'
+ def __init__(self):
+ gtk.Bin.__init__(self)
+
+class BinTest(unittest.TestCase):
+ def testSet(self):
+ bin = MyBin()
+ self.assertEqual(bin.child, None)
+ child = gtk.Label()
+ bin.child = child
+ self.assertEqual(bin.child, child)
+ bin.child = None
+ self.assertEqual(bin.child, None)