[pitivi/1.0] tests: Fix isolation by clearing Zoomable._instances
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/1.0] tests: Fix isolation by clearing Zoomable._instances
- Date: Sat, 17 Mar 2018 05:52:14 +0000 (UTC)
commit a12c7920e0af918b683a3d098c8690334003a894
Author: Harish Fulara <harish14143 iiitd ac in>
Date: Fri Mar 2 23:29:33 2018 +0530
tests: Fix isolation by clearing Zoomable._instances
tests/common.py | 6 +++++-
tests/test_render.py | 3 ---
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tests/common.py b/tests/common.py
index fb2019e8..ea8e091c 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -181,6 +181,10 @@ class TestCase(unittest.TestCase, Loggable):
del self._tracked
def setUp(self):
+ # TODO: Get rid of Zoomable._instances.
+ from pitivi.utils.timeline import Zoomable
+ del Zoomable._instances[:]
+
self._num_failures = len(getattr(self._result, 'failures', []))
self._num_errors = len(getattr(self._result, 'errors', []))
if detect_leaks:
@@ -293,4 +297,4 @@ def create_test_clip(clip_type):
clip = clip_type()
clip.selected = Selected()
clip.ui = None
- return clip
\ No newline at end of file
+ return clip
diff --git a/tests/test_render.py b/tests/test_render.py
index a9f887ba..90e2809b 100644
--- a/tests/test_render.py
+++ b/tests/test_render.py
@@ -266,9 +266,6 @@ class TestRender(BaseTestMediaLibrary):
def check_simple_rendering_profile(self, profile_name):
"""Checks that rendering with the specified profile works."""
- # TODO: Get rid of Zoomable._instances.
- from pitivi.utils.timeline import Zoomable
- del Zoomable._instances[:]
project = self.create_simple_project()
dialog = self.create_rendering_dialog(project)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]