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/data/inputfiles/test.jpg | Bin 0 -> 48766 bytes tests/data/inputfiles/test.ogg | Bin 0 -> 30043 bytes tests/data/inputfiles/test.png | Bin 0 -> 220 bytes tests/data/projects/testproject.avp | 17 +++++++++++++++++ tests/data/test.jpg | Bin 48766 -> 0 bytes tests/data/test.ogg | Bin 30043 -> 0 bytes tests/data/test.png | Bin 220 -> 0 bytes 7 files changed, 17 insertions(+) create mode 100644 tests/data/inputfiles/test.jpg create mode 100644 tests/data/inputfiles/test.ogg create mode 100644 tests/data/inputfiles/test.png create mode 100644 tests/data/projects/testproject.avp delete mode 100644 tests/data/test.jpg delete mode 100644 tests/data/test.ogg delete mode 100644 tests/data/test.png (limited to 'tests/data') diff --git a/tests/data/inputfiles/test.jpg b/tests/data/inputfiles/test.jpg new file mode 100644 index 0000000..86266d9 Binary files /dev/null and b/tests/data/inputfiles/test.jpg differ diff --git a/tests/data/inputfiles/test.ogg b/tests/data/inputfiles/test.ogg new file mode 100644 index 0000000..46af76c Binary files /dev/null and b/tests/data/inputfiles/test.ogg differ diff --git a/tests/data/inputfiles/test.png b/tests/data/inputfiles/test.png new file mode 100644 index 0000000..f1ffd4a Binary files /dev/null and b/tests/data/inputfiles/test.png differ diff --git a/tests/data/projects/testproject.avp b/tests/data/projects/testproject.avp new file mode 100644 index 0000000..fd6b6eb --- /dev/null +++ b/tests/data/projects/testproject.avp @@ -0,0 +1,17 @@ +[Components] +Classic Visualizer +1 +OrderedDict({'bars': 63, 'layout': 0, 'preset': None, 'scale': 20, 'smooth': 0, 'visColor': (255, 255, 255), 'y': 0.0}) +Color +1 +OrderedDict({'LG_end': 0.0, 'LG_start': 0.0, 'RG_centre': 0.0015625, 'RG_end': 0.0, 'RG_start': 0.0, 'color1': (0, 0, 0), 'color2': (133, 133, 133), 'fillType': 0, 'height': 1.0, 'preset': None, 'spread': 0, 'stretch': False, 'trans': False, 'width': 1.0, 'x': 0.0, 'y': 0.0}) + +[Settings] +componentDir=tests/data/inputfiles +inputDir=tests/data/inputfiles +presetDir=tests/data/presets +projectDir=tests/data/projects + +[WindowFields] +lineEdit_audioFile=tests/data/test.ogg +lineEdit_outputFile= diff --git a/tests/data/test.jpg b/tests/data/test.jpg deleted file mode 100644 index 86266d9..0000000 Binary files a/tests/data/test.jpg and /dev/null differ diff --git a/tests/data/test.ogg b/tests/data/test.ogg deleted file mode 100644 index 46af76c..0000000 Binary files a/tests/data/test.ogg and /dev/null differ diff --git a/tests/data/test.png b/tests/data/test.png deleted file mode 100644 index f1ffd4a..0000000 Binary files a/tests/data/test.png and /dev/null differ -- cgit v1.2.3