[pitivi] tests_: Docstrings
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] tests_: Docstrings
- Date: Sun, 11 Dec 2016 14:43:17 +0000 (UTC)
commit c34b62ae2ed1b36e4ff9cac53777061cfcec16ad
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Fri Dec 9 23:37:35 2016 +0100
tests_: Docstrings
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1542
pre-commit.hook | 1 -
tests/test_render.py | 6 ++++--
tests/test_timeline_elements.py | 15 ++++++++++++---
3 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/pre-commit.hook b/pre-commit.hook
index f89e5aa..fbe35ff 100755
--- a/pre-commit.hook
+++ b/pre-commit.hook
@@ -61,7 +61,6 @@ tests/test_preset.py
tests/test_previewers.py
tests/test_project.py
tests/test_system.py
-tests/test_timeline_elements.py
tests/test_timeline_layer.py
tests/test_timeline_timeline.py
tests/test_undo.py
diff --git a/tests/test_render.py b/tests/test_render.py
index 59079ad..979c11f 100644
--- a/tests/test_render.py
+++ b/tests/test_render.py
@@ -17,6 +17,7 @@
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301, USA.
"""Tests for the render module."""
+# pylint: disable=protected-access,no-self-use
from unittest import mock
from gi.repository import GES
@@ -49,13 +50,14 @@ class TestRender(common.TestCase):
self.assertIsNotNone(extension_for_muxer(muxer), preset)
def test_launching_rendering(self):
- """"Checks no exception is raised when clicking the render button."""
+ """Checks no exception is raised when clicking the render button."""
timeline_container = common.create_timeline_container()
app = timeline_container.app
project = app.project_manager.current_project
mainloop = common.create_main_loop()
- def asset_added_cb(project, asset):
+
+ def asset_added_cb(project, asset): # pylint: disable=missing-docstring
mainloop.quit()
project.connect("asset-added", asset_added_cb)
diff --git a/tests/test_timeline_elements.py b/tests/test_timeline_elements.py
index 12ac34c..4478c7b 100644
--- a/tests/test_timeline_elements.py
+++ b/tests/test_timeline_elements.py
@@ -16,6 +16,8 @@
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301, USA.
+"""Tests for the timeline.elements module."""
+# pylint: disable=protected-access,no-self-use
from unittest import mock
from unittest import TestCase
@@ -29,8 +31,10 @@ from tests.test_timeline_timeline import BaseTestTimeline
class TestKeyframeCurve(BaseTestTimeline):
+ """Tests for the KeyframeCurve class."""
def test_keyframe_toggle(self):
+ """Checks keyframes toggling at the playhead position."""
timeline_container = create_timeline_container()
timeline = timeline_container.timeline
pipeline = timeline._project.pipeline
@@ -90,15 +94,17 @@ class TestKeyframeCurve(BaseTestTimeline):
self.assertEqual(values, [0, ges_clip.props.duration])
def test_no_clip_selected(self):
- # When no clip is selected, pressing key should yield no action.
- # Make sure this does not raise any exception
+ """Checks nothing happens when no clip is selected."""
timeline_container = create_timeline_container()
+ # Make sure this does not raise any exception
timeline_container._keyframe_cb(None, None)
-class TestVideoSourceScaling(BaseTestTimeline):
+class TestVideoSource(BaseTestTimeline):
+ """Tests for the VideoSource class."""
def test_video_source_scaling(self):
+ """Checks the size of the scaled clips."""
timeline_container = create_timeline_container()
timeline = timeline_container.timeline
project = timeline.app.project_manager.current_project
@@ -154,6 +160,7 @@ class TestVideoSourceScaling(BaseTestTimeline):
expected_default_position)
def test_rotation(self):
+ """Checks the size of the clips flipped 90 degrees."""
timeline_container = create_timeline_container()
timeline = timeline_container.timeline
@@ -199,8 +206,10 @@ class TestVideoSourceScaling(BaseTestTimeline):
class TestClip(TestCase):
+ """Tests for the Clip class."""
def test_clip_subclasses(self):
+ """Checks the constructors of the Clip class."""
for gtype, widget_class in GES_TYPE_UI_TYPE.items():
ges_object = GObject.new(gtype)
widget = widget_class(mock.Mock(), ges_object)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]