[pitivi/1.0] tests: Cleanup test_clipproperties



commit 50719c60fc69db0562f2a4e41bf83c1e73075e83
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Feb 11 02:12:07 2018 +0100

    tests: Cleanup test_clipproperties

 pre-commit.hook              |    1 -
 tests/common.py              |    3 +--
 tests/test_clipproperties.py |    6 +++++-
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/pre-commit.hook b/pre-commit.hook
index cdd8928..4b0f63a 100755
--- a/pre-commit.hook
+++ b/pre-commit.hook
@@ -55,7 +55,6 @@ pitivi/viewer/title_overlay.py
 pitivi/viewer/viewer.py
 tests/common.py
 tests/test_check.py
-tests/test_clipproperties.py
 tests/test_common.py
 tests/test_log.py
 tests/test_media_library.py
diff --git a/tests/common.py b/tests/common.py
index 9a65d9a..3011fa6 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -92,7 +92,7 @@ def create_pitivi(**settings):
 
 
 def create_timeline_container():
-    app = create_pitivi_mock()
+    app = create_pitivi_mock(leftClickAlsoSeeks=False)
     project_manager = ProjectManager(app)
     project_manager.newBlankProject()
     project = project_manager.current_project
@@ -105,7 +105,6 @@ def create_timeline_container():
     timeline.get_parent = mock.MagicMock(return_value=timeline_container)
 
     app.gui.timeline_ui = timeline_container
-    timeline.app.settings.leftClickAlsoSeeks = False
 
     return timeline_container
 
diff --git a/tests/test_clipproperties.py b/tests/test_clipproperties.py
index 2a8f189..b0f55cf 100644
--- a/tests/test_clipproperties.py
+++ b/tests/test_clipproperties.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 pitivi.clipproperties module."""
+# pylint: disable=protected-access,no-self-use,too-many-locals
 import unittest
 
 from gi.repository import Gtk
@@ -24,8 +26,10 @@ from pitivi.clipproperties import EffectProperties
 
 
 class EffectPropertiesTest(unittest.TestCase):
+    """Tests for the EffectProperties class."""
 
-    def testCalculateEffectPriority(self):
+    def test_calculate_effect_priority(self):
+        """Checks the effect priority calculation."""
         # Dragging 1 onto itself and nearby.
         self.assertEqual(1, EffectProperties.calculateEffectPriority(
             1, 0, Gtk.TreeViewDropPosition.AFTER))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]