summaryrefslogtreecommitdiff
path: root/tests/test_overrides_glib.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2020-11-06 16:02:43 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2020-11-07 09:09:19 +0100
commitebc0eed6f9838253ae6fcaa51695136611c98298 (patch)
tree9f0de5b8b923d12b4fbebde332682ec66410ebdb /tests/test_overrides_glib.py
parentc464187c8b0b228a5299acaf35e74888982429b4 (diff)
downloadpygobject-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.py32
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):