summaryrefslogtreecommitdiff
path: root/tests/test_glib.py
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-10-28 17:37:29 +0100
committerMartin Pitt <martinpitt@gnome.org>2012-10-28 17:39:13 +0100
commit7b12803bce3418bb487127f497f022c973f35888 (patch)
treee634c2b9a3fdccce4f7373740b73fb464efabbfb /tests/test_glib.py
parentb3dfb780b3a74f6933e3afcd2ba512b36dfbe514 (diff)
downloadpygobject-7b12803bce3418bb487127f497f022c973f35888.tar.gz
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.
Diffstat (limited to 'tests/test_glib.py')
-rw-r--r--tests/test_glib.py6
1 files changed, 5 insertions, 1 deletions
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)