From 71a22c6a121d1294a05ef35020c525fa70cae2fd Mon Sep 17 00:00:00 2001 From: Brianna Rainey Date: Thu, 29 Jan 2026 14:50:29 -0500 Subject: v2.2.2 - fix flaky tests, fix UnboundLocalError in MainWindow.createNewProject (#94) * search more than one filename for compName * remove extra QVBoxLayout * insert default components using name instead of index * bump version 2.2.1 to 2.2.2 * tests do not use `.config` for settings Core.storeSettings() is no longer called as a side effect any time avp.core is imported. Thus the tests use a new `initCore` method and the normal user path now relies on entering via `cli.py`. This means certain toolkit functions (e.g., ones using `FFMPEG_BIN`) no longer work if imported from a different python script, unless they call Core.storeSettings() themselves to initialize the settings.ini file * fix UnboundLocalError in createNewProject--- tests/test_commandline_export.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/test_commandline_export.py') diff --git a/tests/test_commandline_export.py b/tests/test_commandline_export.py index 05ead77..6d7f068 100644 --- a/tests/test_commandline_export.py +++ b/tests/test_commandline_export.py @@ -1,14 +1,13 @@ import sys import os import tempfile -from avp.command import Command -from . import getTestDataPath +from . import command, getTestDataPath, MockSignal from pytestqt import qtbot -def test_commandline_classic_export(qtbot): +def test_commandline_classic_export(qtbot, command): """Run Qt event loop and create a video in the system /tmp or /temp""" - soundFile = getTestDataPath("test.ogg") + soundFile = getTestDataPath("inputfiles/test.ogg") outputDir = tempfile.mkdtemp(prefix="avp-test-") outputFilename = os.path.join(outputDir, "output.mp4") sys.argv = [ @@ -21,9 +20,6 @@ def test_commandline_classic_export(qtbot): "-o", outputFilename, ] - - command = Command() - command.quit = lambda _: None command.parseArgs() # Command object now has a video_thread Worker which is exporting the video -- cgit v1.2.3