diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-04 11:24:57 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-04 11:29:29 +0200 |
commit | c20db2d70de4b730d0dd3e62333587d13e6d20a1 (patch) | |
tree | 65e5118150be61248a788c2eacb095a16e466499 /tests/test_gi.py | |
parent | 7d8f8e86e9961f5ca3e777f31a40ec257747e51e (diff) | |
download | pygobject-c20db2d70de4b730d0dd3e62333587d13e6d20a1.tar.gz |
pygi_gint_from_py: fix wrong range in error message, add test
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r-- | tests/test_gi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py index db138e66..bf51874c 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -1610,6 +1610,11 @@ class TestGValue(unittest.TestCase): self.assertRaises(OverflowError, GIMarshallingTests.gvalue_flat_array, [GLib.MININT - 1, "42", True]) + with pytest.raises(OverflowError, + match=r'.*not in range %d to %d.*' % ( + GLib.MININT, GLib.MAXINT)): + GIMarshallingTests.gvalue_flat_array([GLib.MAXINT + 1, "42", True]) + def test_gvalue_flat_array_out(self): values = GIMarshallingTests.return_gvalue_flat_array() self.assertEqual(values, [42, '42', True]) |