handle tuple returns from file dialog properly

This commit is contained in:
Veronica K. B. Olsen
2020-10-07 19:19:36 +02:00
parent 48742ceb0e
commit e22f99cffb
5 changed files with 12 additions and 17 deletions
+2 -2
View File
@@ -283,10 +283,10 @@ def testWritingStatsExport(qtbot, monkeypatch, yesToAll, nwFuncTemp, nwTemp):
assert isinstance(sessLog, GuiWritingStats)
qtbot.wait(stepDelay)
monkeypatch.setattr(QFileDialog, "getSaveFileName", lambda *args, **kwargs: [])
monkeypatch.setattr(QFileDialog, "getSaveFileName", lambda *args, **kwargs: ("", ""))
assert not sessLog._saveData(sessLog.FMT_CSV)
monkeypatch.setattr(QFileDialog, "getSaveFileName", lambda ss, tt, pp, options: [pp])
monkeypatch.setattr(QFileDialog, "getSaveFileName", lambda ss, tt, pp, options: (pp, ""))
assert sessLog._saveData(sessLog.FMT_CSV)
qtbot.wait(stepDelay)
assert sessLog._saveData(sessLog.FMT_JSON)