diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-03-28 22:05:10 +0000 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2009-03-28 22:05:10 +0000 |
commit | 96bf175f8217e20ca449d9a5aeb8ea90b5844383 (patch) | |
tree | 6b735b73a874162c234ec1cb654a0804240c1470 /tests | |
parent | 3ed45914ee441d76822c26bf2f34d79fd3c2d7df (diff) | |
download | pygobject-96bf175f8217e20ca449d9a5aeb8ea90b5844383.tar.gz pygobject-96bf175f8217e20ca449d9a5aeb8ea90b5844383.tar.xz pygobject-96bf175f8217e20ca449d9a5aeb8ea90b5844383.zip |
add a couple of convinence functions to convert from/to a python list and
2009-03-28 Gian Mario Tagliaretti <gianmt@gnome.org>
* 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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gio.py | 18 |
1 files changed, 17 insertions, 1 deletions
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)) |