From 96bf175f8217e20ca449d9a5aeb8ea90b5844383 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sat, 28 Mar 2009 22:05:10 +0000 Subject: add a couple of convinence functions to convert from/to a python list and 2009-03-28 Gian Mario Tagliaretti * gio/pygio-utils.[hc]: (strv_to_pylist) (pylist_to_strv) add a couple of convinence functions to convert from/to a python list and an array of strings. * gio/Makefile.am * gio/gdrive.override: * gio/gio.override: Strip GDrive overrides and wrap g_drive_enumerate_identifiers * tests/test_gio.py: * gio/gvolume.override: wrap g_volume_enumerate_identifiers * gio/gio.defs: add missing g_drive_get_identifier and g_drive_enumerate_identifiers svn path=/trunk/; revision=1035 --- tests/test_gio.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_gio.py b/tests/test_gio.py index a9b273b..e308a2a 100644 --- a/tests/test_gio.py +++ b/tests/test_gio.py @@ -381,7 +381,8 @@ class TestFile(unittest.TestCase): self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_UINT64) self.assertEqual(info.name, "time::modified") self.assertEqual(info.flags, - gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED) + gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED | + gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE) def testQueryWritableNamespaces(self): infolist = self.file.query_writable_namespaces() @@ -842,3 +843,18 @@ class TestVfs(unittest.TestCase): def testGetSupportedURISchemes(self): result = self.vfs.get_supported_uri_schemes() self.failUnless(type(result), []) + +class TestVolume(unittest.TestCase): + def setUp(self): + self.monitor = gio.volume_monitor_get() + + def testVolumeEnumerate(self): + volumes = self.monitor.get_volumes() + self.failUnless(isinstance(volumes, list)) + for v in volumes: + if v is not None: + ids = v.enumerate_identifiers() + self.failUnless(isinstance(ids, list)) + for id in ids: + if id is not None: + self.failUnless(isinstance(id, str)) -- cgit