summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2023-03-24 17:01:09 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2023-03-24 17:01:09 +0100
commit1f06906412d7e5e1c26bbfe600ed75beccff7742 (patch)
treeeadc50c1f7229c492e695f8e1610bbb4645c22d1 /tests
parentfa0b0e258aff23dded18aa3705791299a63d7b9a (diff)
downloadpygobject-1f06906412d7e5e1c26bbfe600ed75beccff7742.tar.gz
tests: fix tests with glib 2.76
Fallout from https://gitlab.gnome.org/GNOME/glib/-/commit/0ffe86a1f7e215e4561c3b9f1d03c3cd638ed00f Our test suite runs with G_DEBUG=fatal-criticals and the last glib release upgraded some warnings which we explicitely ignored or captured to criticals, making the tests fail in various places. Ignore those new criticals where needed.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_properties.py2
-rw-r--r--tests/test_repository.py4
-rw-r--r--tests/test_signal.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_properties.py b/tests/test_properties.py
index ec5df0ca..f8b7823b 100644
--- a/tests/test_properties.py
+++ b/tests/test_properties.py
@@ -688,7 +688,7 @@ class TestProperty(unittest.TestCase):
# we test known-bad values here which cause Gtk-WARNING logs.
# Explicitly allow these for this test.
- with capture_glib_warnings(allow_warnings=True):
+ with capture_glib_warnings(allow_warnings=True, allow_criticals=True):
o = C()
self.assertEqual(o.prop_int, 1)
diff --git a/tests/test_repository.py b/tests/test_repository.py
index 0aa29b63..4390ff04 100644
--- a/tests/test_repository.py
+++ b/tests/test_repository.py
@@ -364,7 +364,7 @@ class Test(unittest.TestCase):
# also raise a RuntimeError.
GIMarshallingTests.NoTypeFlags # cause flags registration
info = repo.find_by_name('GIMarshallingTests', 'NoTypeFlags')
- with capture_glib_warnings(allow_warnings=True):
+ with capture_glib_warnings(allow_warnings=True, allow_criticals=True):
self.assertRaises(RuntimeError,
GIRepository.flags_register_new_gtype_and_add,
info)
@@ -374,7 +374,7 @@ class Test(unittest.TestCase):
# also raise a RuntimeError.
GIMarshallingTests.Enum # cause enum registration
info = repo.find_by_name('GIMarshallingTests', 'Enum')
- with capture_glib_warnings(allow_warnings=True):
+ with capture_glib_warnings(allow_warnings=True, allow_criticals=True):
self.assertRaises(RuntimeError,
GIRepository.enum_register_new_gtype_and_add,
info)
diff --git a/tests/test_signal.py b/tests/test_signal.py
index e327d374..8a935fd8 100644
--- a/tests/test_signal.py
+++ b/tests/test_signal.py
@@ -365,7 +365,7 @@ class TestClosures(unittest.TestCase):
self.count += 1
def _callback_invalid_stop_emission_name(self, obj, prop):
- with capture_glib_warnings(allow_warnings=True) as warn:
+ with capture_glib_warnings(allow_warnings=True, allow_criticals=True) as warn:
obj.stop_emission_by_name('notasignal::baddetail')
self.emission_error = True
self.assertTrue(warn)