summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-29 11:55:09 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-29 11:55:55 -0300
commit9d6d30cb6a2c901a4e282bde0e205a5226c778c8 (patch)
treef60eab382e438902288efb9f98af5e94b540e28d
parent7810dcd829d9435406b9b89ebcd56affab2c8dc7 (diff)
downloadpyside-9d6d30cb6a2c901a4e282bde0e205a5226c778c8.tar.gz
pyside-9d6d30cb6a2c901a4e282bde0e205a5226c778c8.tar.xz
pyside-9d6d30cb6a2c901a4e282bde0e205a5226c778c8.zip
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 e458d8b..42edba0 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()