[pitivi] tests_: Remove unused argument from test method
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] tests_: Remove unused argument from test method
- Date: Wed, 4 Jan 2017 15:45:25 +0000 (UTC)
commit 449c3ddd553f44b49f4bbe3bb631393e887e1e3a
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Dec 21 14:29:19 2016 +0100
tests_: Remove unused argument from test method
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1571
pitivi/medialibrary.py | 7 ++++---
pitivi/project.py | 4 ++--
tests/test_media_library.py | 14 +++++++-------
tests/test_undo_project.py | 2 +-
4 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index eb51df2..2d80ae0 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -1126,13 +1126,14 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
self.iconview.unselect_all()
def __stopUsingProxyCb(self, unused_action, unused_parameter):
- self._project.disableProxiesForAssets(self.getSelectedAssets())
+ self._project.disable_proxies_for_assets(self.getSelectedAssets())
def __useProxiesCb(self, unused_action, unused_parameter):
- self._project.useProxiesForAssets(self.getSelectedAssets())
+ self._project.use_proxies_for_assets(self.getSelectedAssets())
def __deleteProxiesCb(self, unused_action, unused_parameter):
- self._project.disableProxiesForAssets(self.getSelectedAssets(), delete_proxy_file=True)
+ self._project.disable_proxies_for_assets(self.getSelectedAssets(),
+ delete_proxy_file=True)
def __createMenuModel(self):
if self.app.proxy_manager.proxyingUnsupported:
diff --git a/pitivi/project.py b/pitivi/project.py
index 9c3a354..d639eae 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -1178,7 +1178,7 @@ class Project(Loggable, GES.Project):
self.app.proxy_manager.disconnect_by_func(self.__assetTranscodingCancelledCb)
self.app.proxy_manager.disconnect_by_func(self.__proxyReadyCb)
- def useProxiesForAssets(self, assets):
+ def use_proxies_for_assets(self, assets):
originals = []
for asset in assets:
proxy_target = asset.get_proxy_target()
@@ -1192,7 +1192,7 @@ class Project(Loggable, GES.Project):
asset.force_proxying = True
self.app.proxy_manager.add_job(asset)
- def disableProxiesForAssets(self, assets, delete_proxy_file=False):
+ def disable_proxies_for_assets(self, assets, delete_proxy_file=False):
for asset in assets:
proxy_target = asset.get_proxy_target()
if proxy_target:
diff --git a/tests/test_media_library.py b/tests/test_media_library.py
index 19da700..f0cdc6d 100644
--- a/tests/test_media_library.py
+++ b/tests/test_media_library.py
@@ -118,7 +118,7 @@ class BaseTestMediaLibrary(common.TestCase):
class TestMediaLibrary(BaseTestMediaLibrary):
- def stopUsingProxies(self, delete_proxies=False):
+ def stop_using_proxies(self, delete_proxies=False):
sample_name = "30fps_numeroted_frames_red.mkv"
self.runCheckImport([sample_name])
@@ -127,7 +127,7 @@ class TestMediaLibrary(BaseTestMediaLibrary):
self.assertEqual(proxy.props.proxy_target.props.id, asset_uri)
- self.app.project_manager.current_project.disableProxiesForAssets(
+ self.app.project_manager.current_project.disable_proxies_for_assets(
[proxy], delete_proxies)
self.assertEqual(len(self.medialibrary.storemodel),
len(self.samples))
@@ -183,11 +183,11 @@ class TestMediaLibrary(BaseTestMediaLibrary):
self.assertEqual(len(list(self.medialibrary.getSelectedPaths())),
len(self.samples))
- def testStopUsingProxies(self, delete_proxies=False):
- self.stopUsingProxies()
+ def test_stop_using_proxies(self):
+ self.stop_using_proxies()
- def testDeleteProxy(self):
- self.stopUsingProxies(True)
+ def test_delete_proxy(self):
+ self.stop_using_proxies(delete_proxies=True)
asset = self.medialibrary.storemodel[0][medialibrary.COL_ASSET]
proxy_uri = self.app.proxy_manager.getProxyUri(asset)
@@ -201,7 +201,7 @@ class TestMediaLibrary(BaseTestMediaLibrary):
self.assertIsNone(asset.get_proxy())
# And let's recreate the proxy file.
- self.app.project_manager.current_project.useProxiesForAssets([asset])
+ self.app.project_manager.current_project.use_proxies_for_assets([asset])
self.assertEqual(asset.creation_progress, 0)
# Check that the info column notifies the user about progress
diff --git a/tests/test_undo_project.py b/tests/test_undo_project.py
index 23cbc85..a556e1b 100644
--- a/tests/test_undo_project.py
+++ b/tests/test_undo_project.py
@@ -106,7 +106,7 @@ class TestProjectUndo(TestCase):
mainloop.quit()
self.app.proxy_manager.connect("proxy-ready", proxy_ready_cb)
- self.project.useProxiesForAssets(assets)
+ self.project.use_proxies_for_assets(assets)
mainloop.run()
self.assertEqual(len(self.project.list_assets(GES.Extractable)), 2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]