diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-05-03 18:09:46 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:18 -0300 |
commit | ba6726449fe30636389955f00ee74dda07b0b2ea (patch) | |
tree | 5f22f0f7b1863f4458c153fc9f09ec1e4eda49a0 /tests | |
parent | 8e8e8b044b69029fb2d1a346cf9707f4d7e3fa9e (diff) |
Created unit test fo QMacStyle class.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/mac/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/mac/qmacstyle_test.py | 14 |
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f12e62c3a..34e3844bb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -78,4 +78,9 @@ else() TEST_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia) TEST_QT_MODULE(QT_PHONON_FOUND phonon) TEST_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative) + + #platform specific + if (ENABLE_MAC) + add_subdirectory(mac) + endif () endif() diff --git a/tests/mac/CMakeLists.txt b/tests/mac/CMakeLists.txt new file mode 100644 index 000000000..e1eb1a2fd --- /dev/null +++ b/tests/mac/CMakeLists.txt @@ -0,0 +1 @@ +PYSIDE_TEST(qmacstyle_test.py) diff --git a/tests/mac/qmacstyle_test.py b/tests/mac/qmacstyle_test.py new file mode 100644 index 000000000..34777d9ec --- /dev/null +++ b/tests/mac/qmacstyle_test.py @@ -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() |