From f42afa4f0d7045868008db95a79b0661d06b479f Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Wed, 4 Apr 2018 11:49:40 +0200 Subject: overflow tests: fix error message match in case the value is larger than long It will fail early in PYGLIB_PyLong_AsLong() and give us a different error message. It would be nice if the error would be independent of the long size, but that's for another time. --- tests/test_overrides_glib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_overrides_glib.py') diff --git a/tests/test_overrides_glib.py b/tests/test_overrides_glib.py index 8df4b41a..d0a2d64c 100644 --- a/tests/test_overrides_glib.py +++ b/tests/test_overrides_glib.py @@ -576,7 +576,8 @@ class TestGVariant(unittest.TestCase): gerror, source_str) gerror = GLib.Error(code=GLib.MAXUINT) - self.assertRaisesRegexp(OverflowError, ".*not in range.*", + self.assertRaisesRegexp(OverflowError, + ".*(not in range|too large to convert).*", GLib.Variant.parse_error_print_context, gerror, source_str) -- cgit v1.2.1