[pitivi] tests_: Avoid TestLayers tests being run twice
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] tests_: Avoid TestLayers tests being run twice
- Date: Sun, 19 Feb 2017 23:49:01 +0000 (UTC)
commit db89ea9ae56984711a3d60004536941da157b91d
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Feb 11 23:24:48 2017 +0100
tests_: Avoid TestLayers tests being run twice
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1659
tests/test_undo_timeline.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_undo_timeline.py b/tests/test_undo_timeline.py
index a8d1776..97f7846 100644
--- a/tests/test_undo_timeline.py
+++ b/tests/test_undo_timeline.py
@@ -37,7 +37,6 @@ from pitivi.undo.undo import PropertyChangedAction
from pitivi.utils.ui import LAYER_HEIGHT
from pitivi.utils.ui import URI_TARGET_ENTRY
from tests import common
-from tests.test_timeline_timeline import TestLayers
class BaseTestUndoTimeline(TestCase):
@@ -94,6 +93,9 @@ class BaseTestUndoTimeline(TestCase):
def check_layers(self, layers):
self.assertEqual(self.timeline.get_layers(), layers)
+ # Import TestLayers locally, otherwise its tests are discovered and
+ # run twice.
+ from tests.test_timeline_timeline import TestLayers
TestLayers.check_priorities_and_positions(self, self.timeline.ui, layers, list(range(len(layers))))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]