From 4ded3b88384f2f8c303ff5726c142dc285b7c9f4 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 4 May 2019 10:47:07 -0400 Subject: [PATCH] python: Avoid warning about using deprecated methods Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/69 --- bindings/python/gi/overrides/GES.py | 2 +- tests/check/python/test_timeline.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bindings/python/gi/overrides/GES.py b/bindings/python/gi/overrides/GES.py index 631e931f9f..af51e615f1 100644 --- a/bindings/python/gi/overrides/GES.py +++ b/bindings/python/gi/overrides/GES.py @@ -70,7 +70,7 @@ class TimelineElement(GES.TimelineElement): ) def set_child_property(self, prop_name, prop_value): - res, child, unused_pspec = self.lookup_child(prop_name) + res, child, unused_pspec = GES.TimelineElement.lookup_child(self, prop_name) if not res: return res diff --git a/tests/check/python/test_timeline.py b/tests/check/python/test_timeline.py index 67905b0eef..ded93f3899 100644 --- a/tests/check/python/test_timeline.py +++ b/tests/check/python/test_timeline.py @@ -935,3 +935,12 @@ class TestPriorities(common.GESSimpleTimelineTest): clip.props.start = 101 self.timeline.commit() self.assertGreater(clip.props.priority, clip1.props.priority) + + +class TestTimelineElement(common.GESSimpleTimelineTest): + + def test_set_child_property(self): + clip = self.add_clip(0, 0, 100) + source = clip.find_track_element(None, GES.VideoSource) + self.assertTrue(source.set_child_property("height", 5)) + self.assertEqual(clip.get_child_property("height"), (True, 5))