Skip to content

Commit

Permalink
Having troubles running Docker. One last attempt of blindly reading t…
Browse files Browse the repository at this point in the history
…he messages and seeing if the application/mainwindow is required for this to work.
  • Loading branch information
jasonbrackman committed Mar 13, 2024
1 parent c9a9f8d commit 7d6d0e2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,6 @@ def test_load_ui_pycustomwidget():
expected.
"""

from Qt import QtCompat

path_tests = {
# Input: Expected

Expand All @@ -491,6 +489,11 @@ def test_load_ui_pycustomwidget():
"path/to/module": "path/to/module",
"module.py": "module.py",
}
import sys
from Qt import QtWidgets, QtCompat

app = QtWidgets.QApplication(sys.argv)
win = QtWidgets.QMainWindow()

current = "tests"
for provided, expected in path_tests.items():
Expand All @@ -499,7 +502,7 @@ def test_load_ui_pycustomwidget():

try:
# actual test
QtCompat.loadUi(self.ui_qpycustomwidget)
QtCompat.loadUi(self.ui_qpycustomwidget, win)

except ImportError as error:
# Since the loadUi is a blackbox it is not possible to test the
Expand All @@ -509,7 +512,7 @@ def test_load_ui_pycustomwidget():
assert result == expected, (
"Provided: %s expected: %s got: %s" % (provided, expected, result)
)

app.exit()

def test_load_ui_invalidpath():
"""Tests to see if loadUi successfully fails on invalid paths"""
Expand Down

0 comments on commit 7d6d0e2

Please sign in to comment.