Commit 0d3fe6fa authored by Tyler Senne's avatar Tyler Senne
Browse files

common: Fix broken decorator

parent 69ecebc1
Pipeline #279461 passed with stages
in 78 minutes and 17 seconds
......@@ -27,6 +27,7 @@ import sys
import tempfile
import traceback
import unittest
from typing import List
from unittest import mock
from gi.repository import Gdk
......@@ -188,13 +189,13 @@ class CheckedOperationDuration:
signal.alarm(0)
def setup_project_with_clips(assets_names=None): # pylint: disable=unused-argument
def setup_project_with_clips(assets_names: List[str]):
"""Sets up a Pitivi instance with the specified assets on the timeline."""
# Ensure this method is not being used directly as a decorator.
assert isinstance(assets_names, list)
def decorator(func):
nonlocal assets_names
if assets_names is None:
assets_names = ["1sec_simpsons_trailer.mp4"]
def wrapper(self):
with cloned_sample(*assets_names):
......
......@@ -585,7 +585,7 @@ class SpeedPropertiesTest(common.TestCase):
self.timeline_container.timeline.selection.select([clip1])
self.assert_applied_rate(1, 2.0, clip1_duration / 2)
@common.setup_project_with_clips
@common.setup_project_with_clips(assets_names=["1sec_simpsons_trailer.mp4"])
@common.setup_clipproperties
def test_load_project_clip_speed(self):
sources_count = 2
......
......@@ -412,7 +412,7 @@ class TestVideoSource(common.TestCase):
self.assertEqual(width, 960)
self.assertEqual(height, 400)
@common.setup_project_with_clips
@common.setup_project_with_clips(assets_names=["1sec_simpsons_trailer.mp4"])
@common.setup_clipproperties
def test_change_set_project_size(self):
"""Checks the size of the scaled clips after project settings changes."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment