Added a call to QObject.metaObject() to check if a segfault is caused.

This completes the tests for bug #507[1].

Also removed an unnecessary commented line.

[1] http://bugs.openbossa.org/show_bug.cgi?id=507

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
Marcelo Lira 2010-12-17 13:55:07 -03:00 committed by Hugo Parente Lima
commit 803a270840

View file

@ -39,7 +39,6 @@ class ListModelThatReturnsString(QAbstractListModel):
def data(self, index, role):
self.obj = 'string'
return self.obj
#return 'string'
class ModelViewTest(unittest.TestCase):
@ -50,6 +49,7 @@ class ModelViewTest(unittest.TestCase):
obj = view.getData()
self.assertEqual(type(obj), MyObject)
self.assertEqual(obj.objectName(), object_name)
obj.metaObject()
def testListModelKeepsReference(self):
model = ListModelKeepsReference()