diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2020-11-06 16:02:43 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2020-11-07 09:09:19 +0100 |
commit | ebc0eed6f9838253ae6fcaa51695136611c98298 (patch) | |
tree | 9f0de5b8b923d12b4fbebde332682ec66410ebdb /tests/test_overrides_glib.py | |
parent | c464187c8b0b228a5299acaf35e74888982429b4 (diff) | |
download | pygobject-ebc0eed6f9838253ae6fcaa51695136611c98298.tar.gz |
tests: Remove usage of some deprecated unittest methods
Diffstat (limited to 'tests/test_overrides_glib.py')
-rw-r--r-- | tests/test_overrides_glib.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/test_overrides_glib.py b/tests/test_overrides_glib.py index d8f1a6c0..08c41ae2 100644 --- a/tests/test_overrides_glib.py +++ b/tests/test_overrides_glib.py @@ -691,30 +691,30 @@ class TestGVariant(unittest.TestCase): def test_parse_error_exceptions(self): source_str = 'abc' - self.assertRaisesRegexp(TypeError, 'Must be GLib.Error, not int', - GLib.Variant.parse_error_print_context, - 42, source_str) + self.assertRaisesRegex(TypeError, 'Must be GLib.Error, not int', + GLib.Variant.parse_error_print_context, + 42, source_str) gerror = GLib.Error(message=42) # not a string - self.assertRaisesRegexp(TypeError, ".*Must be string, not int.*", - GLib.Variant.parse_error_print_context, - gerror, source_str) + self.assertRaisesRegex(TypeError, ".*Must be string, not int.*", + GLib.Variant.parse_error_print_context, + gerror, source_str) gerror = GLib.Error(domain=42) # not a string - self.assertRaisesRegexp(TypeError, ".*Must be string, not int.*", - GLib.Variant.parse_error_print_context, - gerror, source_str) + self.assertRaisesRegex(TypeError, ".*Must be string, not int.*", + GLib.Variant.parse_error_print_context, + gerror, source_str) gerror = GLib.Error(code='not an int') - self.assertRaisesRegexp(TypeError, ".*Must be number, not str.*", - GLib.Variant.parse_error_print_context, - gerror, source_str) + self.assertRaisesRegex(TypeError, ".*Must be number, not str.*", + GLib.Variant.parse_error_print_context, + gerror, source_str) gerror = GLib.Error(code=GLib.MAXUINT) - self.assertRaisesRegexp(OverflowError, - ".*not in range.*", - GLib.Variant.parse_error_print_context, - gerror, source_str) + self.assertRaisesRegex(OverflowError, + ".*not in range.*", + GLib.Variant.parse_error_print_context, + gerror, source_str) class TestConstants(unittest.TestCase): |