From de5fce1737f04bfe525caeab390b55bd46037d67 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Tue, 17 Jun 2008 19:57:11 +0000 Subject: Sort out confusion between interfaces and objects, add test. Fixes #538601 2008-06-17 Johan Dahlin * gio/gio-types.defs: * tests/test_gio.py: Sort out confusion between interfaces and objects, add test. Fixes #538601 svn path=/trunk/; revision=788 --- tests/test_gio.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_gio.py b/tests/test_gio.py index e7387f1..a21eba7 100644 --- a/tests/test_gio.py +++ b/tests/test_gio.py @@ -235,7 +235,16 @@ class TestVolumeMonitor(unittest.TestCase): def testGetMounts(self): mounts = self.monitor.get_mounts() self.failUnless(isinstance(mounts, list)) - + if not mounts: + return + + self.failUnless(isinstance(mounts[0], gio.Mount)) + # Bug 538601 + icon = mounts[0].get_icon() + if not icon: + return + self.failUnless(isinstance(icon, gio.Icon)) + class TestThemedIcon(unittest.TestCase): def setUp(self): @@ -280,4 +289,4 @@ class TestAppInfo(unittest.TestCase): def testSimple(self): self.assertEquals(self.appinfo.get_description(), - "Custom definition for (null)") + "Custom definition for does-not-exist") -- cgit