From 7b12803bce3418bb487127f497f022c973f35888 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 28 Oct 2012 17:37:29 +0100 Subject: Remove static get_current_time() binding Use GLib.get_real_time() through GI instead. Deprecate the function, as GLib.get_real_time() should be called directly. --- tests/test_glib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_glib.py') diff --git a/tests/test_glib.py b/tests/test_glib.py index b1e3fc40..3753ea66 100644 --- a/tests/test_glib.py +++ b/tests/test_glib.py @@ -63,7 +63,11 @@ https://my.org/q?x=1&y=2 'http://gnome.org/new']) def test_current_time(self): - tm = GLib.get_current_time() + with warnings.catch_warnings(record=True) as warn: + warnings.simplefilter('always') + tm = GLib.get_current_time() + self.assertTrue(issubclass(warn[0].category, PyGIDeprecationWarning)) + self.assertTrue(isinstance(tm, float)) self.assertGreater(tm, 1350000000.0) -- cgit v1.2.1