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:
parent
7f42b68c29
commit
803a270840
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue