diff options
author | Christian Tismer <tismer@stackless.com> | 2020-11-24 18:33:13 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2020-11-25 07:45:24 +0000 |
commit | 0e03a2524e1d98f717f204252e155762e0439e93 (patch) | |
tree | c0755b232b37419ac2528b1d1f9a23e5c0f6d5b6 /sources/pyside6 | |
parent | d5bc255aa50a9181a3258b17c07b8da0890cb035 (diff) |
errorhandler.py: use AttributeError instead of TypeError
There is a small improvement needed in errorhandler.py:
It was not consequent to use TypeError for missing attributes
in one case, and to use AttributeError on the constructors.
The error message may be different, but it always should be
AttributeError.
Task-number: PYSIDE-1305
Task-number: PYSIDE-1019
Change-Id: I1c278c5256000f0f0fe66ca9da36c2d078002b25
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r-- | sources/pyside6/tests/pysidetest/constructor_properties_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside6/tests/pysidetest/constructor_properties_test.py b/sources/pyside6/tests/pysidetest/constructor_properties_test.py index 9892c618d..fbfbdffeb 100644 --- a/sources/pyside6/tests/pysidetest/constructor_properties_test.py +++ b/sources/pyside6/tests/pysidetest/constructor_properties_test.py @@ -79,7 +79,7 @@ class DiverseKeywordsTest(UsesQApplication): def testUndefinedKeyword(self): r, g, b, a = 1, 2, 3, 4 # From the jira issue: - with self.assertRaises(TypeError) as cm: + with self.assertRaises(AttributeError) as cm: QColor(r, g, b, a, alpha=0) self.assertTrue("unsupported" in cm.exception.args[0]) |