From f03a3a686c7304588dd434322c73506531e53595 Mon Sep 17 00:00:00 2001 From: Brianna Rainey Date: Thu, 12 Feb 2026 15:38:54 -0500 Subject: v2.2.4 - Quiet FFmpeg; add "invert" option to Classic Vis; fix CLI parsing for Image component (#96) * change noisiness of terminal output ffmpeg no longer prints everything into the terminal unless we're in `--verbose` mode. percentage progress text stays on one line while not in verbose mode. * Added hint to run `avp --verbose` if `avp --log` is run with no avp_debug.log file present * Classic Visualizer: add invert option * Image component: fix path commandline option * Image component: restrict file formats in CLI to match GUI * Color component: add tooltip to color2 picker (second color of gradients) * change tests to work with pytest-xdist avp core stores its config (location of `settings.ini`) in temp directories if using multiple workers to run tests, so they don't interfere with each other. when using a single worker, the `tests/data/config` directory is still used * check alt comp names when parsing cmdline * rename `original.py` to `classic.py` * move `component.py` into subpackage * rename comp_original to comp_classic * show traceback if renderFrame() raises exception * do not try to insert non-existent components from project files * add "composite" property for components if a component returns "composite" then it will receive a frame to draw on during calls to previewRender and frameRender * more tests of projects, actions, waveform, spectrum, image, color, classic * do not change presetDir to "projects" within PresetManager--- tests/test_comp_original.py | 67 --------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 tests/test_comp_original.py (limited to 'tests/test_comp_original.py') diff --git a/tests/test_comp_original.py b/tests/test_comp_original.py deleted file mode 100644 index 8cd00a4..0000000 --- a/tests/test_comp_original.py +++ /dev/null @@ -1,67 +0,0 @@ -from avp.command import Command -from avp.toolkit.visualizer import transformData -from pytestqt import qtbot -from pytest import fixture -from . import audioData, command, MockSignal, imageDataSum - - -sampleSize = 1470 # 44100 / 30 = 1470 - - -@fixture -def coreWithClassicComp(qtbot, command): - """Fixture providing a Command object with Classic Visualizer component added""" - command.core.insertComponent( - 0, command.core.moduleIndexFor("Classic Visualizer"), command - ) - yield command.core - - -def test_comp_classic_added(coreWithClassicComp): - """Add Classic Visualizer to core""" - assert len(coreWithClassicComp.selectedComponents) == 1 - - -def test_comp_classic_removed(coreWithClassicComp): - """Remove Classic Visualizer from core""" - coreWithClassicComp.removeComponent(0) - assert len(coreWithClassicComp.selectedComponents) == 0 - - -def test_comp_classic_drawBars(coreWithClassicComp, audioData): - """Call drawBars after creating audio spectrum data manually.""" - - spectrumArray = {0: transformData(0, audioData[0], sampleSize, 0.08, 0.8, None, 20)} - for i in range(sampleSize, len(audioData[0]), sampleSize): - spectrumArray[i] = transformData( - i, - audioData[0], - sampleSize, - 0.08, - 0.8, - spectrumArray[i - sampleSize].copy(), - 20, - ) - image = coreWithClassicComp.selectedComponents[0].drawBars( - 1920, 1080, spectrumArray[sampleSize * 4], (0, 0, 0), 0 - ) - assert imageDataSum(image) == 37872316 - - -def test_comp_classic_drawBars_using_preFrameRender(coreWithClassicComp, audioData): - """Call drawBars after creating audio spectrum data using preFrameRender.""" - comp = coreWithClassicComp.selectedComponents[0] - comp.preFrameRender( - completeAudioArray=audioData[0], - sampleSize=sampleSize, - progressBarSetText=MockSignal(), - progressBarUpdate=MockSignal(), - ) - image = comp.drawBars( - 1920, - 1080, - coreWithClassicComp.selectedComponents[0].spectrumArray[sampleSize * 4], - (0, 0, 0), - 0, - ) - assert imageDataSum(image) == 37872316 -- cgit v1.2.3