From 1d05357e2657df96b16b5cb4f2e9cc2b6ca73d2b Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 29 Dec 2010 11:55:09 -0300 Subject: Changed api2 test to work on MacOS during a ssh session. --- tests/QtGui/api2_test.py | 15 +++++++-------- 1 file 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() -- cgit v1.2.3