[pygobject] Add test for GLib.get_current_time()



commit cfec113e3b3eabf8db834f48b2f16792d1e841a3
Author: Martin Pitt <martinpitt gnome org>
Date:   Tue Oct 23 08:17:40 2012 +0200

    Add test for GLib.get_current_time()
    
    This adds a plausibility test, as well as ensuring the documented return type.
    This will be useful if/once we drop the static _glib binding.

 tests/test_glib.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_glib.py b/tests/test_glib.py
index 97d7648..c073b02 100644
--- a/tests/test_glib.py
+++ b/tests/test_glib.py
@@ -59,3 +59,8 @@ https://my.org/q?x=1&y=2
         self.assertEqual(res, ['http://example.com',
                                'https://my.org/q?x=1&y=2',
                                'http://gnome.org/new'])
+
+    def test_current_time(self):
+        tm = GLib.get_current_time()
+        self.assertTrue(isinstance(tm, float))
+        self.assertGreater(tm, 1350000000.0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]