Attempt to fix the wizard test
This commit is contained in:
+2
-12
@@ -752,21 +752,11 @@ def testNewProjectWizard(qtbot, monkeypatch, yesToAll, nwMinimal, nwTemp):
|
|||||||
assert not nwGUI.newProject()
|
assert not nwGUI.newProject()
|
||||||
|
|
||||||
monkeypatch.undo()
|
monkeypatch.undo()
|
||||||
nwGUI.closeMain()
|
|
||||||
nwGUI.close()
|
|
||||||
|
|
||||||
# qtbot.stopForInteraction()
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Test the Wizard
|
# Test the Wizard
|
||||||
##
|
##
|
||||||
|
|
||||||
nwGUI = nw.main(["--testmode", "--config=%s" % nwMinimal, "--data=%s" % nwTemp])
|
|
||||||
qtbot.addWidget(nwGUI)
|
|
||||||
nwGUI.show()
|
|
||||||
qtbot.waitForWindowShown(nwGUI)
|
|
||||||
qtbot.wait(stepDelay)
|
|
||||||
|
|
||||||
monkeypatch.setattr(GuiProjectWizard, "exec_", lambda *args: None)
|
monkeypatch.setattr(GuiProjectWizard, "exec_", lambda *args: None)
|
||||||
nwGUI.mainConf.lastPath = " "
|
nwGUI.mainConf.lastPath = " "
|
||||||
|
|
||||||
@@ -782,7 +772,8 @@ def testNewProjectWizard(qtbot, monkeypatch, yesToAll, nwMinimal, nwTemp):
|
|||||||
nwWiz = getGuiItem("GuiProjectWizard")
|
nwWiz = getGuiItem("GuiProjectWizard")
|
||||||
assert isinstance(nwWiz, GuiProjectWizard)
|
assert isinstance(nwWiz, GuiProjectWizard)
|
||||||
nwWiz.show()
|
nwWiz.show()
|
||||||
qtbot.waitForWindowShown(nwWiz)
|
nwWiz.setObjectName("Dummy%d" % wStep) # Hack to prevent returning the same object twice
|
||||||
|
qtbot.wait(stepDelay)
|
||||||
|
|
||||||
# Intro Page
|
# Intro Page
|
||||||
introPage = nwWiz.currentPage()
|
introPage = nwWiz.currentPage()
|
||||||
@@ -911,7 +902,6 @@ def testNewProjectWizard(qtbot, monkeypatch, yesToAll, nwMinimal, nwTemp):
|
|||||||
|
|
||||||
nwWiz.reject()
|
nwWiz.reject()
|
||||||
nwWiz.close()
|
nwWiz.close()
|
||||||
del nwWiz
|
|
||||||
|
|
||||||
# qtbot.stopForInteraction()
|
# qtbot.stopForInteraction()
|
||||||
nwGUI.closeMain()
|
nwGUI.closeMain()
|
||||||
|
|||||||
Reference in New Issue
Block a user