Added all original pyside unit tests to the shiboken version.
This commit is contained in:
parent
aa12538d63
commit
9af36fbb64
160 changed files with 6616 additions and 12 deletions
31
tests/qtcore/qmetaobject_test.py
Normal file
31
tests/qtcore/qmetaobject_test.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
'''Tests for static methos conflicts with class methods'''
|
||||
|
||||
import unittest
|
||||
|
||||
from PySide.QtCore import *
|
||||
|
||||
class Foo(QFile):
|
||||
pass
|
||||
|
||||
class qmetaobject_test(unittest.TestCase):
|
||||
def test_QMetaObject(self):
|
||||
qobj = QObject()
|
||||
qobj_metaobj = qobj.metaObject()
|
||||
self.assertEqual(qobj_metaobj.className(), "QObject")
|
||||
|
||||
obj = QFile()
|
||||
m = obj.metaObject()
|
||||
self.assertEqual(m.className(), "QFile")
|
||||
self.assertNotEqual(m.methodCount(), qobj_metaobj.methodCount())
|
||||
|
||||
obj = Foo()
|
||||
m = obj.metaObject()
|
||||
self.assertEqual(m.className(), "Foo")
|
||||
self.assertEqual(m.methodCount(), QFile().metaObject().methodCount())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue