diff options
author | Johan Dahlin <johan@gnome.org> | 2008-08-01 16:43:45 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-08-01 16:43:45 +0000 |
commit | 85612d1460845935e4c6747f8dc666d4f499dee1 (patch) | |
tree | 2e1bee13c72823f2abbae6c31d3ce44d4ea8c396 /tests | |
parent | 60d03ac1b8f211e805ea129b54d2a60b40627255 (diff) | |
download | pygobject-85612d1460845935e4c6747f8dc666d4f499dee1.tar.gz pygobject-85612d1460845935e4c6747f8dc666d4f499dee1.tar.xz pygobject-85612d1460845935e4c6747f8dc666d4f499dee1.zip |
Bug 545861 – g_file_info_get_modification_time is missing
2008-08-01 Johan Dahlin <johan@gnome.org>
Bug 545861 – g_file_info_get_modification_time is missing
* gio/gfileinfo.override:
* gio/gio.defs:
* tests/test_gio.py:
Wrap, add test and documentation
svn path=/trunk/; revision=905
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gio.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py index 39f7796..d4054de 100644 --- a/tests/test_gio.py +++ b/tests/test_gio.py @@ -429,12 +429,18 @@ class TestContentTypeGuess(unittest.TestCase): class TestFileInfo(unittest.TestCase): + def setUp(self): + self.fileinfo = gio.File("test_gio.py").query_info("*") + def testListAttributes(self): - fileinfo = gio.File("test_gio.py").query_info("*") - attributes = fileinfo.list_attributes("standard") + attributes = self.fileinfo.list_attributes("standard") self.failUnless(attributes) self.failUnless('standard::name' in attributes) + def testModificationTime(self): + mtime = self.fileinfo.get_modification_time() + self.assertEqual(type(mtime), float) + class TestAppInfo(unittest.TestCase): def setUp(self): @@ -450,4 +456,4 @@ class TestVfs(unittest.TestCase): def testGetSupportedURISchemes(self): result = self.vfs.get_supported_uri_schemes() - self.failUnless(isinstance(result, []) + self.failUnless(type(result), []) |