On 01/06/11 02:18, Hugo Parente Lima wrote:
On Monday 30 May 2011 22:14:36 Myles Jackson wrote:
Hey Guys, anyone tried getting Squish to work with PySide?
Works out of the box with PyQt but my test cases time out on squish
commands e.g:
sendEvent("QCloseEvent", waitForObject(":_MainWindow"))
I'm not experienced with Squish, so I don't know what the waitForObject
function does internally, would be nice if you could provide a small Squish
test to show us the problem then file a bug report, so we can proper fix it
going a bit deeper into the issue.
Sure, the most basic setup consists of the PySide App:
#!/usr/bin/env python
from PySide.QtGui import *
from PySide.QtCore import *
class MyMainWindow(QMainWindow) :
def __init__(self, parent=None) :
QMainWindow.__init__(self, parent=None)
def main() :
app = QApplication([])
window = MyMainWindow()
window.show()
app.exec_()
if __name__ == '__main__' :
main()
& a python squish test which looks like this::
def main():
startApplication("test.py")
sendEvent("QCloseEvent", waitForObject(":_MyMainWindow"))
I've put this in the bug report too ::
http://bugs.pyside.org/show_bug.cgi?id=872
Thanks Hugo.
error on timeout:
Detail LookupError: Object ':_MainWindow' not found. Could not match
properties: type for object name: ':_MainWindow'
(This works for native QT& PyQt)
The docs talk about squish inserting a hook into the QT executable (it's
designed for testing C++ binaries) but not how this hook is achieved.
"""The squishserver starts the AUT and injects the Squish hook into
it. The hook is a small library that makes the AUT's live running objects
accessible and that can communicate with the squishserver."""
Also the QT docs talk about using squish
http://developer.qt.nokia.com/wiki/Category:Tools::Squish
but again nothing that gives me much as to why PySide isn't compatible or
how to go about making it work.
Any thoughts guys?
tested with:
PySide v1.0.1& v1.0.3
Squish v4.0.2
Cheeeeers
M
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside