summaryrefslogtreecommitdiff
path: root/tests/test_signal.py
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2012-11-04 02:57:29 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2012-11-05 00:09:09 -0800
commitda2106902eb3dabebdff1674743cb3040566a745 (patch)
tree5a42c011ba4c55f0c5e58f9543f64dcd5e3bfa3a /tests/test_signal.py
parentf4acd6a9d14248d459708f61fd01f6d4735f087d (diff)
downloadpygobject-da2106902eb3dabebdff1674743cb3040566a745.tar.gz
Move gobject static functions and constants to gi
Replace the following functions with gi and overrides: type_children, type_interfaces, signal_list_ids, signal_list_names, signal_lookup, signal_name, type_parent. Assign SIGNAL_* and PARAM_* from gi SignalFlags and ParamFlags respectively. Move module level assignments of a number of static functions to the GObject.py overrides file. https://bugzilla.gnome.org/show_bug.cgi?id=687487
Diffstat (limited to 'tests/test_signal.py')
-rw-r--r--tests/test_signal.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_signal.py b/tests/test_signal.py
index 8f0a2e7c..f4396ced 100644
--- a/tests/test_signal.py
+++ b/tests/test_signal.py
@@ -735,9 +735,10 @@ class TestPython3Signals(unittest.TestCase):
class TestSignalModuleLevelFunctions(unittest.TestCase):
- @unittest.expectedFailure # https://bugzilla.gnome.org/show_bug.cgi?id=687492
+ @unittest.skipIf(sys.version_info < (2, 7), 'Requires Python >= 2.7')
def test_signal_list_ids_with_invalid_type(self):
- self.assertRaises(TypeError, GObject.signal_list_ids, GObject.TYPE_INVALID)
+ with self.assertRaisesRegexp(TypeError, 'type must be instantiable or an interface.*'):
+ GObject.signal_list_ids(GObject.TYPE_INVALID)
@unittest.skipIf(sys.version_info < (2, 7), 'Requires Python >= 2.7')
def test_signal_list_ids(self):
@@ -751,10 +752,10 @@ class TestSignalModuleLevelFunctions(unittest.TestCase):
# There is no signal 0 in gobject
self.assertEqual(GObject.signal_name(0), None)
- @unittest.expectedFailure # https://bugzilla.gnome.org/show_bug.cgi?id=687492
+ @unittest.skipIf(sys.version_info < (2, 7), 'Requires Python >= 2.7')
def test_signal_lookup_with_invalid_type(self):
- self.assertRaises(TypeError, GObject.signal_lookup,
- 'NOT_A_SIGNAL_NAME', GObject.TYPE_INVALID)
+ with self.assertRaisesRegexp(TypeError, 'type must be instantiable or an interface.*'):
+ GObject.signal_lookup('NOT_A_SIGNAL_NAME', GObject.TYPE_INVALID)
@unittest.skipIf(sys.version_info < (2, 7), 'Requires Python >= 2.7')
def test_signal_lookup(self):