summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-09-27 15:59:13 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-09-27 15:59:13 +0000
commitb4205323655072faef3e0d86a219c374ef9535b3 (patch)
treebfadf3957e1c252b24110d9468ac0ac785f5a867
parentaa2fc4070b361e679a219e3c1e9dc75dd3acfb9d (diff)
downloadpygobject-b4205323655072faef3e0d86a219c374ef9535b3.tar.gz
Revert parts of Gustavos changes, so the size of interfaces are correct.
* codegen/codegen.py (FileOutput.resetline): Revert parts of Gustavos changes, so the size of interfaces are correct. * tests/test_subtype.py: tests for this.
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/test_subtype.py13
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f9428f94..151671b5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,7 +2,8 @@ tests = \
conversion.py \
enum.py \
gtype.py \
- test_signal.py
+ test_signal.py \
+ test_subtype.py
PYTHONPATH = $(top_builddir):$(top_builddir)/gobject:$(top_srcdir):$(top_srcdir)/gtk
diff --git a/tests/test_subtype.py b/tests/test_subtype.py
new file mode 100644
index 00000000..6a13b31b
--- /dev/null
+++ b/tests/test_subtype.py
@@ -0,0 +1,13 @@
+import unittest
+
+from common import gobject, gtk
+
+class TestSubType(unittest.TestCase):
+ def testSubType(self):
+ t = type('testtype', (gobject.GObject, gobject.GInterface), {})
+ assert issubclass(t, gobject.GObject)
+ assert issubclass(t, gobject.GInterface)
+ t = type('testtype2', (gobject.GObject, gtk.TreeModel), {})
+ assert issubclass(t, gobject.GObject)
+ assert issubclass(t, gtk.TreeModel)
+