Changed api2 test to work on MacOS during a ssh session.
This commit is contained in:
parent
7810dcd829
commit
9d6d30cb6a
1 changed files with 7 additions and 8 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
import sys
|
||||||
|
|
||||||
from PySide.QtCore import QObject
|
from PySide.QtCore import QObject
|
||||||
from PySide.QtGui import *
|
from PySide.QtGui import *
|
||||||
|
|
@ -38,23 +39,21 @@ class DoubleQObjectInheritanceTest(UsesQApplication):
|
||||||
|
|
||||||
obj.setRange(1, 10)
|
obj.setRange(1, 10)
|
||||||
obj.setValue(0)
|
obj.setValue(0)
|
||||||
print "Value:", obj.value()
|
self.assertEqual(obj.value(), 1)
|
||||||
|
|
||||||
class QClipboardTest(UsesQApplication):
|
class QClipboardTest(UsesQApplication):
|
||||||
|
|
||||||
def testQClipboard(self):
|
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!")
|
clip.setText("Testing this thing!")
|
||||||
|
|
||||||
text, subtype = clip.text("")
|
text, subtype = clip.text("")
|
||||||
self.assertEqual(subtype, "plain")
|
self.assertEqual(subtype, "plain")
|
||||||
self.assertEqual(text, "Testing this thing!")
|
self.assertEqual(text, "Testing this thing!")
|
||||||
|
|
||||||
#class QFileDialog(UsesQApplication):
|
|
||||||
#
|
|
||||||
# def testQFileDialog(self):
|
|
||||||
# string, filtr = QFileDialog.getOpenFileName()
|
|
||||||
# print string, filtr
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue