From e5cbe608aec0c634c2f3a4aef5ca2950507b521b Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 9 Jun 2016 18:52:15 +0100 Subject: [PATCH] Minor improvements to coding style --- qtpy/uic.py | 6 +++--- tests/test_ui.py | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/qtpy/uic.py b/qtpy/uic.py index 92c7bd0f..28b4d313 100644 --- a/qtpy/uic.py +++ b/qtpy/uic.py @@ -191,8 +191,8 @@ def loadUi(uifile, baseinstance=None, customWidgets=None, return widget -# The following class is private and only for testing purposes (it is needed by -# test_ui.py) - class _QComboBoxSubclass(QComboBox): + """ + This is a private class that is used only for testing purposes. + """ pass \ No newline at end of file diff --git a/tests/test_ui.py b/tests/test_ui.py index 2011ba4d..4b64dc31 100644 --- a/tests/test_ui.py +++ b/tests/test_ui.py @@ -5,6 +5,9 @@ def get_qapp(icon_path=None): + """ + Helper function to return a QApplication instance + """ qapp = QtWidgets.QApplication.instance() if qapp is None: qapp = QtWidgets.QApplication(['']) @@ -12,6 +15,9 @@ def get_qapp(icon_path=None): def test_load_ui(): + """ + Make sure that the patched loadUi function behaves as expected + """ app = get_qapp() ui = loadUi(os.path.join(os.path.dirname(__file__), 'test.ui')) assert isinstance(ui.pushButton, QtWidgets.QPushButton)