blob: 3bc0be6ebaecfd064c0c944aeee1ac1fb4ed7745 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
from avp.command import Command
from pytestqt import qtbot
from pytest import fixture
from . import audioData, MockSignal, imageDataSum
@fixture
def coreWithTextComp(qtbot):
"""Fixture providing a Command object with Title Text component added"""
command = Command()
command.core.insertComponent(0, command.core.moduleIndexFor("Title Text"), command)
yield command.core
def test_comp_text_renderFrame_resize(coreWithTextComp):
"""Call renderFrame of Title Text component added to Command object."""
comp = coreWithTextComp.selectedComponents[0]
comp.parent.settings.setValue("outputWidth", 1920)
comp.parent.settings.setValue("outputHeight", 1080)
comp.parent.core.updateComponent(0)
image = comp.frameRender(0)
assert imageDataSum(image) == 2957069
def test_comp_text_renderFrame(coreWithTextComp):
"""Call renderFrame of Title Text component added to Command object."""
comp = coreWithTextComp.selectedComponents[0]
comp.parent.settings.setValue("outputWidth", 1280)
comp.parent.settings.setValue("outputHeight", 720)
comp.parent.core.updateComponent(0)
image = comp.frameRender(0)
assert imageDataSum(image) == 1412293 or 1379298
|