On Wed, Mar 10, 2010 at 11:54 AM, Gibran Rodriguez <[email protected]> wrote:
> Hello,
>
> how can I use the QtTest module?.Because I haven't found documentation on
> this module at
>
> http://www.pyside.org/docs/pyside/
>
> Like for example, I have seen that the PySide team implements test cases
> like this:
>
> import unittest
>
> from PySide.QtCore import *
> from PySide.QtGui import *
> from PySide.QtTest import QTest
>
> from helper import UsesQApplication
>
> how could I set a test environment like the one above? thank you in advance.
>

Hi Gibran,

The QtTest was added only on Shiboken last week, and just the QTest
namespace with mouse, keyboard, etc. functions. The documentation
still reflects the released boost bindings. Once we release shiboken
they will be updated.

Once imported, you can use functions like mouseClick, keyPress to
simulate Qt GUI events.

PS: UsesQApplication is a unittest.TestCase subclass to avoid creating
multiple instances of a QApplication.

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to