Start a single window test application with a form automatically generated for the driver. :param target: a driver object or a collection of drivers. :param width: to be used as minimum width of the window. :param qapp_or_args: arguments to be passed to QApplication.
(target, width=500, qapp_or_args=None)
| 251 | |
| 252 | |
| 253 | def start_test_app(target, width=500, qapp_or_args=None): |
| 254 | """Start a single window test application with a form automatically |
| 255 | generated for the driver. |
| 256 | |
| 257 | :param target: a driver object or a collection of drivers. |
| 258 | :param width: to be used as minimum width of the window. |
| 259 | :param qapp_or_args: arguments to be passed to QApplication. |
| 260 | """ |
| 261 | |
| 262 | if isinstance(qapp_or_args, QtGui.QApplication): |
| 263 | qapp = qapp_or_args |
| 264 | else: |
| 265 | qapp = QtGui.QApplication(qapp_or_args or ['']) |
| 266 | |
| 267 | if isinstance(target, Driver): |
| 268 | main = DriverTestWidget(None, target) |
| 269 | else: |
| 270 | main = SetupTestWidget(None, target) |
| 271 | main.setMinimumWidth(width) |
| 272 | main.setWindowTitle('Lantz Driver Test Panel') |
| 273 | main.show() |
| 274 | if sys.platform.startswith('darwin'): |
| 275 | main.raise_() |
| 276 | qapp.exec_() |
| 277 | |
| 278 | |
| 279 | def start_gui(ui_filename, drivers, qapp_or_args=None): |
no test coverage detected