aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/samplebinding/objecttype_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/objecttype_test.py')
-rw-r--r--sources/shiboken2/tests/samplebinding/objecttype_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken2/tests/samplebinding/objecttype_test.py b/sources/shiboken2/tests/samplebinding/objecttype_test.py
index bda14c69c..f1a06c2b1 100644
--- a/sources/shiboken2/tests/samplebinding/objecttype_test.py
+++ b/sources/shiboken2/tests/samplebinding/objecttype_test.py
@@ -118,5 +118,13 @@ class ObjectTypeTest(unittest.TestCase):
self.assertLess(abs(before - after), 5)
+ def testInvalidProperty(self):
+ o = ObjectType()
+ try:
+ o.typo
+ self.assertFail()
+ except AttributeError as error:
+ self.assertEqual(error.args[0], "'sample.ObjectType' object has no attribute 'typo'")
+
if __name__ == '__main__':
unittest.main()