Skip to content

v2.2.2 - fix flaky tests, fix UnboundLocalError in MainWindow.createNewProject#94

Merged
tassaron merged 6 commits intomasterfrom
dev-2.2.2
Jan 29, 2026
Merged

v2.2.2 - fix flaky tests, fix UnboundLocalError in MainWindow.createNewProject#94
tassaron merged 6 commits intomasterfrom
dev-2.2.2

Conversation

@tassaron
Copy link
Collaborator

The fix to #92 created a new bug where creating a new project while unsaved changes exist in the currently loaded project would trigger an UnboundLocalError. Silly typo-adjacent error on my part.

  • I added new tests for MainWindow.createNewProject and MainWindow.openProject to prevent the error re-occuring,
  • while doing that I found the source of some test inconsistency (.config was still being used in tests, which it no longer is).
  • massive changes to the test suite due to moving all instantiation of Command or MainWindow objects into pytest fixtures, which I did so I could configure Core to use a different settings.ini file for tests

If the tests pass in GitHub Actions then I'll merge this very soon as glitches in the project system prevent the app from launching (without a workaround like loading a different project).

changing moduleIndex of Classic Visualizer from 0 to 1 exposed this bug to me
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
@tassaron tassaron merged commit 71a22c6 into master Jan 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant