summaryrefslogtreecommitdiff
path: root/tests/test_source.py
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-10-26 10:39:28 +0200
committerMartin Pitt <martinpitt@gnome.org>2012-10-26 10:39:28 +0200
commitf976d05b04f26e733d19988e68989e340eb3a29e (patch)
treea0ca638ae47d9b2e95be4206f98c89d80468412d /tests/test_source.py
parent366f5d2d3902c6293d0031e0b7dc5d6641a05ac7 (diff)
downloadpygobject-f976d05b04f26e733d19988e68989e340eb3a29e.tar.gz
Use a custom deprecation warning to make them visible by default
DeprecationWarning is not shown by default, and is thus rather useless for developers. Use a custom PyGIDeprecationWarning class and derive it from RuntimeWarning to make it visible.
Diffstat (limited to 'tests/test_source.py')
-rw-r--r--tests/test_source.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_source.py b/tests/test_source.py
index 5f0b16c0..ba9ea376 100644
--- a/tests/test_source.py
+++ b/tests/test_source.py
@@ -4,6 +4,7 @@ import unittest
import warnings
from gi.repository import GLib, GObject
+from gi import PyGIDeprecationWarning
class Idle(GLib.Idle):
@@ -162,7 +163,7 @@ class TestSource(unittest.TestCase):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always')
time = s.get_current_time()
- self.assertTrue(issubclass(w[0].category, DeprecationWarning))
+ self.assertTrue(issubclass(w[0].category, PyGIDeprecationWarning))
self.assertTrue(isinstance(time, float))
# plausibility check, and check magnitude of result