diff options
author | Christian Tismer <tismer@stackless.com> | 2018-07-14 15:10:56 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2019-01-10 09:15:44 +0000 |
commit | a0543241df2273ad60a4c92e4ffe6e0cfb1042b9 (patch) | |
tree | 0e12bac1f772c6f8a985c63709e89231c3889e56 /sources/shiboken2/tests | |
parent | 77265fcedc3411fb70e149cf9d9cd4f549de80e6 (diff) |
Produce TypeError Messages Using the Signature Module
The TypeError messages can now be produced, based upon the
signature module.
As a feature under test, we produce ValueErrors instead in
certain cases. This will probably improve, later.
We are currently investigating how much can be determined,
automatically.
Task-number: PYSIDE-795
Change-Id: Ie8a648beaf8a3bed388e3c01ba501bb36859722e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/tests')
-rw-r--r-- | sources/shiboken2/tests/samplebinding/decisor_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/shiboken2/tests/samplebinding/decisor_test.py b/sources/shiboken2/tests/samplebinding/decisor_test.py index 9102e2d4e..734c43760 100644 --- a/sources/shiboken2/tests/samplebinding/decisor_test.py +++ b/sources/shiboken2/tests/samplebinding/decisor_test.py @@ -43,13 +43,15 @@ class DecisorTest(unittest.TestCase): This can trigger the bug #262, which means using an argument not provided by the user.''' pt = Point() - self.assertRaises(TypeError, SampleNamespace.forceDecisorSideA, pt) + # This exception may move from a TypeError to a ValueError. + self.assertRaises((TypeError, ValueError), SampleNamespace.forceDecisorSideA, pt) def testCallWithInvalidParametersSideB(self): '''Same as the previous test, but with an integer as first argument, just to complicate things for the overload method decisor.''' pt = Point() - self.assertRaises(TypeError, SampleNamespace.forceDecisorSideB, 1, pt) + # This exception may move from a TypeError to a ValueError. + self.assertRaises((TypeError, ValueError), SampleNamespace.forceDecisorSideB, 1, pt) def testDecideCallWithInheritance(self): '''Call methods overloads that receive parent and inheritor classes' instances.''' |