aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-29 11:55:09 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:05 -0300
commit1d05357e2657df96b16b5cb4f2e9cc2b6ca73d2b (patch)
tree27a33e4c38b655da50b79bf04e8e76963bec811a
parentd8f3b9629a6b1f1ab91516fdc144eb4fd80e5128 (diff)
Changed api2 test to work on MacOS during a ssh session.
-rw-r--r--tests/QtGui/api2_test.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/QtGui/api2_test.py b/tests/QtGui/api2_test.py
index e458d8bbf..42edba07a 100644
--- a/tests/QtGui/api2_test.py
+++ b/tests/QtGui/api2_test.py
@@ -2,6 +2,7 @@
import unittest
+import sys
from PySide.QtCore import QObject
from PySide.QtGui import *
@@ -38,23 +39,21 @@ class DoubleQObjectInheritanceTest(UsesQApplication):
obj.setRange(1, 10)
obj.setValue(0)
- print "Value:", obj.value()
+ self.assertEqual(obj.value(), 1)
class QClipboardTest(UsesQApplication):
def testQClipboard(self):
- clip = QClipboard()
+ #skip this test on MacOS because the clipboard is not available during the ssh session
+ #this cause problems in the buildbot
+ if sys.platform == 'darwin':
+ return
+ clip = QApplication.clipboard()
clip.setText("Testing this thing!")
text, subtype = clip.text("")
self.assertEqual(subtype, "plain")
self.assertEqual(text, "Testing this thing!")
-#class QFileDialog(UsesQApplication):
-#
-# def testQFileDialog(self):
-# string, filtr = QFileDialog.getOpenFileName()
-# print string, filtr
-
if __name__ == '__main__':
unittest.main()