Created unit test fo QMacStyle class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
645c80134f
commit
0dd57ef4a5
3 changed files with 20 additions and 0 deletions
|
|
@ -78,4 +78,9 @@ else()
|
||||||
TEST_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia)
|
TEST_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia)
|
||||||
TEST_QT_MODULE(QT_PHONON_FOUND phonon)
|
TEST_QT_MODULE(QT_PHONON_FOUND phonon)
|
||||||
TEST_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
|
TEST_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
|
||||||
|
|
||||||
|
#platform specific
|
||||||
|
if (ENABLE_MAC)
|
||||||
|
add_subdirectory(mac)
|
||||||
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
1
tests/mac/CMakeLists.txt
Normal file
1
tests/mac/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
PYSIDE_TEST(qmacstyle_test.py)
|
||||||
14
tests/mac/qmacstyle_test.py
Normal file
14
tests/mac/qmacstyle_test.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
from PySide.QtGui import QApplication, QLabel, QMacStyle
|
||||||
|
from PySide.QtCore import QObject
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from helper import UsesQApplication
|
||||||
|
|
||||||
|
class QMacStyleTest(UsesQApplication):
|
||||||
|
def testWidgetStyle(self):
|
||||||
|
w = QLabel('Hello')
|
||||||
|
self.assertTrue(isinstance(w.style(), QMacStyle))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue