summaryrefslogtreecommitdiff
path: root/tests/test_overrides.py
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:47:13 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:47:16 +0900
commit0c23c15365643b062119d3e0335f62a39835fd5e (patch)
tree691e70cfd6bbc9da67a3869f629819059a30c89e /tests/test_overrides.py
parente49df4afb1654f59a39d02e6ec0ecdf537ce9351 (diff)
downloadpygobject2-0c23c15365643b062119d3e0335f62a39835fd5e.tar.gz
pygobject2-0c23c15365643b062119d3e0335f62a39835fd5e.tar.bz2
pygobject2-0c23c15365643b062119d3e0335f62a39835fd5e.zip
Imported Upstream version 3.3.90
Change-Id: I2320e829dc2f47614d46efbbf92575dc9c71980e Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tests/test_overrides.py')
-rw-r--r--tests/test_overrides.py55
1 files changed, 32 insertions, 23 deletions
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 3990454..c9b8682 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -932,6 +932,13 @@ class TestGtk(unittest.TestCase):
self.tester.assertEqual(int_value, self.int_value)
self.tester.assertEqual(string_value, self.string_value)
+ def test_tree_model_sort(self):
+ self.assertEqual(Gtk.TreeModelSort, overrides.Gtk.TreeModelSort)
+ self.assertRaises(TypeError, Gtk.TreeModelSort)
+ model = Gtk.TreeStore(int, bool)
+ model_sort = Gtk.TreeModelSort(model)
+ self.assertEqual(model_sort.get_model(), model)
+
def test_tree_store(self):
self.assertEqual(Gtk.TreeStore, overrides.Gtk.TreeStore)
self.assertEqual(Gtk.ListStore, overrides.Gtk.ListStore)
@@ -985,21 +992,22 @@ class TestGtk(unittest.TestCase):
i = 97
label = 'this is child #%d' % i
testobj = TestGtk.TestClass(self, i, label)
- tree_store.set(parent, 0, i,
- 2, testobj,
- 1, label,
- 3, testobj,
- 4, test_pyobj,
- 5, test_pydict,
- 6, test_pylist,
- 7, i % 2,
- 8, bool(i % 2),
- 9, i,
- 10, GObject.G_MAXULONG,
- 11, GObject.G_MININT64,
- 12, 0xffffffffffffffff,
- 13, 254,
- 14, _bytes('a'))
+ tree_store.set(parent,
+ 0, i,
+ 2, testobj,
+ 1, label,
+ 3, testobj,
+ 4, test_pyobj,
+ 5, test_pydict,
+ 6, test_pylist,
+ 7, i % 2,
+ 8, bool(i % 2),
+ 9, i,
+ 10, GObject.G_MAXULONG,
+ 11, GObject.G_MININT64,
+ 12, 0xffffffffffffffff,
+ 13, 254,
+ 14, _bytes('a'))
parent = tree_store.append(parent)
i = 98
@@ -1251,14 +1259,15 @@ class TestGtk(unittest.TestCase):
i = 100
label = 'this is row #100'
treeiter = list_store.append()
- list_store.set(treeiter, 1, label,
- 0, i,
- 2, TestGtk.TestClass(self, i, label),
- 3, test_pyobj,
- 4, test_pydict,
- 5, test_pylist,
- 6, 0,
- 7, False)
+ list_store.set(treeiter,
+ 1, label,
+ 0, i,
+ 2, TestGtk.TestClass(self, i, label),
+ 3, test_pyobj,
+ 4, test_pydict,
+ 5, test_pylist,
+ 6, 0,
+ 7, False)
i = 101
label = 'this is row #101'
treeiter = list_store.append()