Code review comment for lp://staging/~coreygoldberg/window-mocker/py3

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

290 +
291 +
292 +

Too much whitespace (PEP8) :)

190 +# use Qt4 plugin for Python2, Qt5 plugin for Python3
191 +if sys.version_info[0] < 3:
192 + from windowmocker.plugins.qt4 import QtPlugin
193 +else:
194 + from windowmocker.plugins.qt5 import QtPlugin

Just thinking about our upgrade strategy here... If we do this, then the autopilot tests will need to be duplicated - one set of tests against Qt4, and another against Qt5 (because the introspection tree will be different - please correct me if I'm wrong here).

The Qt4 plugin should be importable in both python2 and python3, and should remain the default plugin.

The Qt5 plugin is only importable in python3, so we should make that plugin selectable, but only in python3 land.

Then we can port the autopilot tests that use window-mocker over, and we can explicitly ask for the Qt5 plugin, and either skip the tests in py2, or re-write them to work in py2/Qt4 as well.

However, following the above strategy will mean we don't break the AP tests once this gets merged.

review: Needs Fixing

« Back to merge proposal