forked from openlp/openlp
pep8 again
This commit is contained in:
parent
e94643b5d1
commit
5dc35112c3
@ -235,7 +235,8 @@ class Ui_ServiceManager(object):
|
|||||||
self.edit_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Edit Item'),
|
self.edit_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Edit Item'),
|
||||||
icon=':/general/general_edit.png', triggers=self.remote_edit)
|
icon=':/general/general_edit.png', triggers=self.remote_edit)
|
||||||
self.rename_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Rename...'),
|
self.rename_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Rename...'),
|
||||||
icon=':/general/general_edit.png', triggers=self.on_service_item_rename)
|
icon=':/general/general_edit.png',
|
||||||
|
triggers=self.on_service_item_rename)
|
||||||
self.maintain_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Reorder Item'),
|
self.maintain_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Reorder Item'),
|
||||||
icon=':/general/general_edit.png',
|
icon=':/general/general_edit.png',
|
||||||
triggers=self.on_service_item_edit_form)
|
triggers=self.on_service_item_edit_form)
|
||||||
|
@ -452,6 +452,7 @@ class HttpRouter(RegistryProperties):
|
|||||||
"""
|
"""
|
||||||
Perform an action on the slide controller.
|
Perform an action on the slide controller.
|
||||||
"""
|
"""
|
||||||
|
log.debug("controller_text var = %s" % var)
|
||||||
current_item = self.live_controller.service_item
|
current_item = self.live_controller.service_item
|
||||||
data = []
|
data = []
|
||||||
if current_item:
|
if current_item:
|
||||||
|
@ -115,14 +115,14 @@ class JenkinsTrigger(object):
|
|||||||
url = build.info['url']
|
url = build.info['url']
|
||||||
print('[%s] %s' % (result_string, url))
|
print('[%s] %s' % (result_string, url))
|
||||||
# On failure open the browser.
|
# On failure open the browser.
|
||||||
#if result_string == "FAILURE":
|
# if result_string == "FAILURE":
|
||||||
# url += 'console'
|
# url += 'console'
|
||||||
# Popen(('xdg-open', url), stderr=PIPE)
|
# Popen(('xdg-open', url), stderr=PIPE)
|
||||||
|
|
||||||
|
|
||||||
def get_repo_name():
|
def get_repo_name():
|
||||||
"""
|
"""
|
||||||
This returns the name of branch of the wokring directory. For example it returns *lp:~googol/openlp/render*.
|
This returns the name of branch of the working directory. For example it returns *lp:~googol/openlp/render*.
|
||||||
"""
|
"""
|
||||||
# Run the bzr command.
|
# Run the bzr command.
|
||||||
bzr = Popen(('bzr', 'info'), stdout=PIPE, stderr=PIPE)
|
bzr = Popen(('bzr', 'info'), stdout=PIPE, stderr=PIPE)
|
||||||
@ -166,7 +166,7 @@ def main():
|
|||||||
help='Disable output.')
|
help='Disable output.')
|
||||||
parser.add_option('-b', '--open-browser', dest='open_browser', action="store_true", default=False,
|
parser.add_option('-b', '--open-browser', dest='open_browser', action="store_true", default=False,
|
||||||
help='Opens the jenkins page in your browser.')
|
help='Opens the jenkins page in your browser.')
|
||||||
#parser.add_option('-e', '--open-browser-on-error', dest='open_browser_on_error', action="store_true",
|
# parser.add_option('-e', '--open-browser-on-error', dest='open_browser_on_error', action="store_true",
|
||||||
# default=False, help='Opens the jenkins page in your browser in case a test fails.')
|
# default=False, help='Opens the jenkins page in your browser in case a test fails.')
|
||||||
options, args = parser.parse_args(sys.argv)
|
options, args = parser.parse_args(sys.argv)
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ def main():
|
|||||||
jenkins_trigger = JenkinsTrigger(token)
|
jenkins_trigger = JenkinsTrigger(token)
|
||||||
try:
|
try:
|
||||||
jenkins_trigger.trigger_build()
|
jenkins_trigger.trigger_build()
|
||||||
except HTTPError as e:
|
except HTTPError:
|
||||||
print("Wrong token.")
|
print("Wrong token.")
|
||||||
return
|
return
|
||||||
# Open the browser before printing the output.
|
# Open the browser before printing the output.
|
||||||
|
@ -96,7 +96,7 @@ class CommandStack(object):
|
|||||||
return len(self.data)
|
return len(self.data)
|
||||||
|
|
||||||
def __getitem__(self, index):
|
def __getitem__(self, index):
|
||||||
if not index in self.data:
|
if index not in self.data:
|
||||||
return None
|
return None
|
||||||
elif self.data[index].get('arguments'):
|
elif self.data[index].get('arguments'):
|
||||||
return self.data[index]['command'], self.data[index]['arguments']
|
return self.data[index]['command'], self.data[index]['arguments']
|
||||||
|
@ -79,5 +79,5 @@ class TestCommonFunctions(TestCase):
|
|||||||
trace_error_handler(mocked_logger)
|
trace_error_handler(mocked_logger)
|
||||||
|
|
||||||
# THEN: The mocked_logger.error() method should have been called with the correct parameters
|
# THEN: The mocked_logger.error() method should have been called with the correct parameters
|
||||||
mocked_logger.error.assert_called_with('OpenLP Error trace\n File openlp.fake at line 56 \n\t called trace_error_handler_test')
|
mocked_logger.error.assert_called_with(
|
||||||
|
'OpenLP Error trace\n File openlp.fake at line 56 \n\t called trace_error_handler_test')
|
||||||
|
@ -482,7 +482,7 @@ class TestLib(TestCase):
|
|||||||
# WHEN: we run the validate_thumb() function
|
# WHEN: we run the validate_thumb() function
|
||||||
|
|
||||||
# THEN: we should have called a few functions, and the result should be True
|
# THEN: we should have called a few functions, and the result should be True
|
||||||
#mocked_os.path.exists.assert_called_with(thumb_path)
|
# mocked_os.path.exists.assert_called_with(thumb_path)
|
||||||
|
|
||||||
def validate_thumb_file_exists_and_older_test(self):
|
def validate_thumb_file_exists_and_older_test(self):
|
||||||
"""
|
"""
|
||||||
|
@ -70,7 +70,7 @@ class TestFormattingTagForm(TestCase):
|
|||||||
form.save_button = MagicMock()
|
form.save_button = MagicMock()
|
||||||
|
|
||||||
# WHEN: on_text_edited is called with an arbitrary value
|
# WHEN: on_text_edited is called with an arbitrary value
|
||||||
#form.on_text_edited('text')
|
# form.on_text_edited('text')
|
||||||
|
|
||||||
# THEN: setEnabled and setDefault should have been called on save_push_button
|
# THEN: setEnabled and setDefault should have been called on save_push_button
|
||||||
#form.save_button.setEnabled.assert_called_with(True)
|
# form.save_button.setEnabled.assert_called_with(True)
|
||||||
|
@ -35,7 +35,7 @@ from bs4 import BeautifulSoup
|
|||||||
from tests.functional import patch, MagicMock
|
from tests.functional import patch, MagicMock
|
||||||
from openlp.plugins.bibles.lib.http import BSExtract
|
from openlp.plugins.bibles.lib.http import BSExtract
|
||||||
|
|
||||||
#TODO: Items left to test
|
# TODO: Items left to test
|
||||||
# BGExtract
|
# BGExtract
|
||||||
# __init__
|
# __init__
|
||||||
# _remove_elements
|
# _remove_elements
|
||||||
@ -68,7 +68,7 @@ class TestBSExtract(TestCase):
|
|||||||
"""
|
"""
|
||||||
Test the BSExtractClass
|
Test the BSExtractClass
|
||||||
"""
|
"""
|
||||||
#TODO: Items left to test
|
# TODO: Items left to test
|
||||||
# BSExtract
|
# BSExtract
|
||||||
# __init__
|
# __init__
|
||||||
# get_bible_chapter
|
# get_bible_chapter
|
||||||
|
@ -47,7 +47,7 @@ class TestPptviewController(TestCase, TestMixin):
|
|||||||
"""
|
"""
|
||||||
Test the PptviewController Class
|
Test the PptviewController Class
|
||||||
"""
|
"""
|
||||||
#TODO: Items left to test
|
# TODO: Items left to test
|
||||||
# PptviewController
|
# PptviewController
|
||||||
# start_process(self)
|
# start_process(self)
|
||||||
# kill
|
# kill
|
||||||
@ -108,7 +108,7 @@ class TestPptviewDocument(TestCase):
|
|||||||
"""
|
"""
|
||||||
Test the PptviewDocument Class
|
Test the PptviewDocument Class
|
||||||
"""
|
"""
|
||||||
#TODO: Items left to test
|
# TODO: Items left to test
|
||||||
# PptviewDocument
|
# PptviewDocument
|
||||||
# __init__
|
# __init__
|
||||||
# create_thumbnails
|
# create_thumbnails
|
||||||
|
@ -44,7 +44,7 @@ class TestFoilPresenter(TestCase):
|
|||||||
"""
|
"""
|
||||||
Test the functions in the :mod:`foilpresenterimport` module.
|
Test the functions in the :mod:`foilpresenterimport` module.
|
||||||
"""
|
"""
|
||||||
#TODO: The following modules still need tests written for
|
# TODO: The following modules still need tests written for
|
||||||
# xml_to_song
|
# xml_to_song
|
||||||
# _child
|
# _child
|
||||||
# _process_authors
|
# _process_authors
|
||||||
|
Loading…
Reference in New Issue
Block a user