Merge lp:~knightrider0xd/openlp/non-text-item-height-default into lp:openlp

Proposed by Ian Knight
Status: Merged
Approved by: Tim Bentley
Approved revision: 2674
Merged at revision: 2674
Proposed branch: lp:~knightrider0xd/openlp/non-text-item-height-default
Merge into: lp:openlp
Diff against target: 252 lines (+111/-19)
7 files modified
openlp/core/common/settings.py (+1/-1)
openlp/core/ui/advancedtab.py (+18/-9)
openlp/core/ui/lib/listpreviewwidget.py (+18/-7)
tests/functional/openlp_core_common/test_registryproperties.py (+0/-1)
tests/functional/openlp_core_ui_lib/test_listpreviewwidget.py (+73/-0)
tests/functional/openlp_plugins/bibles/test_lib.py (+1/-0)
tests/functional/openlp_plugins/songs/test_opsproimport.py (+0/-1)
To merge this branch: bzr merge lp:~knightrider0xd/openlp/non-text-item-height-default
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+296308@code.launchpad.net

This proposal supersedes a proposal from 2016-06-02.

Description of the change

Adds automatic functionality to the max-height for non-text items feature, and sets this as the default value.
Advanced tab spin box replaced with combo box.

Test coverage expanded on other functions in listpreviewwidget and pep8 errors fixed.
Fixed test naming.
Merged with trunk as of 2016-06-02_10:30.

lp:~knightrider0xd/openlp/non-text-item-height-default (revision 2674)
[SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1584/
[SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1495/
[SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1433/
[SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1212/
[SUCCESS] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/802/
[SUCCESS] https://ci.openlp.io/job/Branch-05a-Code_Analysis/870/
[SUCCESS] https://ci.openlp.io/job/Branch-05b-Test_Coverage/738/

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Got this when I started OpenLP.

Traceback (most recent call last):
  File "./openlp.py", line 44, in <module>
    main()
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/__init__.py", line 392, in main
    sys.exit(application.run(qt_args))
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/__init__.py", line 142, in run
    Registry().execute('bootstrap_initialise')
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/common/registry.py", line 137, in execute
    result = function(*args, **kwargs)
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/lib/pluginmanager.py", line 68, in bootstrap_initialise
    self.initialise_plugins()
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/lib/pluginmanager.py", line 183, in initialise_plugins
    plugin.initialise()
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/plugins/media/mediaplugin.py", line 66, in initialise
    super().initialise()
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/lib/plugin.py", line 277, in initialise
    self.media_item.initialise()
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/plugins/media/lib/mediaitem.py", line 303, in initialise
    self.load_list(Settings().value(self.settings_section + '/media files'))
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/plugins/media/lib/mediaitem.py", line 368, in load_list
    item_name.setToolTip('%s@%s-%s' % (file_name, format_milliseconds(start), format_milliseconds(end)))
  File "/home/raoul/Projects/OpenLP/OpenLP/non-text-item-height-default/openlp/core/ui/media/__init__.py", line 143, in format_milliseconds
    millis=millis)
ValueError: Unknown format code 'd' for object of type 'float'

review: Needs Fixing
Revision history for this message
Ian Knight (knightrider0xd) wrote : Posted in a previous version of this proposal

Hey superfly.
I can't replicate this bug, and looking at that trace, it appears to be related to something in media, not my changes.

Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

This code is existing and connected to CD /dvd items in media.
Did you have some media items created and then take to cd / dvd out of the machine?

Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

I figured this out, it's a bug in Ken's new formatting code. I've fixed it.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Please just merge trunk into your branch and resubmit? Thanks.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

Sorry, just spotted this. Your tests are incorrectly named, and won't be picked up by the test runner (especially when we move to nose2).

review: Needs Fixing
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py 2016-05-15 17:32:04 +0000
+++ openlp/core/common/settings.py 2016-06-02 10:36:58 +0000
@@ -129,7 +129,7 @@
129 'advanced/recent file count': 4,129 'advanced/recent file count': 4,
130 'advanced/save current plugin': False,130 'advanced/save current plugin': False,
131 'advanced/slide limits': SlideLimits.End,131 'advanced/slide limits': SlideLimits.End,
132 'advanced/slide max height': 0,132 'advanced/slide max height': -4,
133 'advanced/single click preview': False,133 'advanced/single click preview': False,
134 'advanced/single click service preview': False,134 'advanced/single click service preview': False,
135 'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,135 'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,
136136
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2016-05-20 16:22:06 +0000
+++ openlp/core/ui/advancedtab.py 2016-06-02 10:36:58 +0000
@@ -87,11 +87,14 @@
87 self.ui_layout.addRow(self.expand_service_item_check_box)87 self.ui_layout.addRow(self.expand_service_item_check_box)
88 self.slide_max_height_label = QtWidgets.QLabel(self.ui_group_box)88 self.slide_max_height_label = QtWidgets.QLabel(self.ui_group_box)
89 self.slide_max_height_label.setObjectName('slide_max_height_label')89 self.slide_max_height_label.setObjectName('slide_max_height_label')
90 self.slide_max_height_spin_box = QtWidgets.QSpinBox(self.ui_group_box)90 self.slide_max_height_combo_box = QtWidgets.QComboBox(self.ui_group_box)
91 self.slide_max_height_spin_box.setObjectName('slide_max_height_spin_box')91 self.slide_max_height_combo_box.addItem('', userData=0)
92 self.slide_max_height_spin_box.setRange(0, 1000)92 self.slide_max_height_combo_box.addItem('', userData=-4)
93 self.slide_max_height_spin_box.setSingleStep(20)93 # Generate numeric values for combo box dynamically
94 self.ui_layout.addRow(self.slide_max_height_label, self.slide_max_height_spin_box)94 for px in range(60, 801, 5):
95 self.slide_max_height_combo_box.addItem(str(px) + 'px', userData=px)
96 self.slide_max_height_combo_box.setObjectName('slide_max_height_combo_box')
97 self.ui_layout.addRow(self.slide_max_height_label, self.slide_max_height_combo_box)
95 self.autoscroll_label = QtWidgets.QLabel(self.ui_group_box)98 self.autoscroll_label = QtWidgets.QLabel(self.ui_group_box)
96 self.autoscroll_label.setObjectName('autoscroll_label')99 self.autoscroll_label.setObjectName('autoscroll_label')
97 self.autoscroll_combo_box = QtWidgets.QComboBox(self.ui_group_box)100 self.autoscroll_combo_box = QtWidgets.QComboBox(self.ui_group_box)
@@ -265,7 +268,8 @@
265 'Expand new service items on creation'))268 'Expand new service items on creation'))
266 self.slide_max_height_label.setText(translate('OpenLP.AdvancedTab',269 self.slide_max_height_label.setText(translate('OpenLP.AdvancedTab',
267 'Max height for non-text slides\nin slide controller:'))270 'Max height for non-text slides\nin slide controller:'))
268 self.slide_max_height_spin_box.setSpecialValueText(translate('OpenLP.AdvancedTab', 'Disabled'))271 self.slide_max_height_combo_box.setItemText(0, translate('OpenLP.AdvancedTab', 'Disabled'))
272 self.slide_max_height_combo_box.setItemText(1, translate('OpenLP.AdvancedTab', 'Automatic'))
269 self.autoscroll_label.setText(translate('OpenLP.AdvancedTab',273 self.autoscroll_label.setText(translate('OpenLP.AdvancedTab',
270 'When changing slides:'))274 'When changing slides:'))
271 self.autoscroll_combo_box.setItemText(0, translate('OpenLP.AdvancedTab', 'Do not auto-scroll'))275 self.autoscroll_combo_box.setItemText(0, translate('OpenLP.AdvancedTab', 'Do not auto-scroll'))
@@ -355,10 +359,13 @@
355 self.single_click_preview_check_box.setChecked(settings.value('single click preview'))359 self.single_click_preview_check_box.setChecked(settings.value('single click preview'))
356 self.single_click_service_preview_check_box.setChecked(settings.value('single click service preview'))360 self.single_click_service_preview_check_box.setChecked(settings.value('single click service preview'))
357 self.expand_service_item_check_box.setChecked(settings.value('expand service item'))361 self.expand_service_item_check_box.setChecked(settings.value('expand service item'))
358 self.slide_max_height_spin_box.setValue(settings.value('slide max height'))362 slide_max_height_value = settings.value('slide max height')
363 for i in range(0, self.slide_max_height_combo_box.count()):
364 if self.slide_max_height_combo_box.itemData(i) == slide_max_height_value:
365 self.slide_max_height_combo_box.setCurrentIndex(i)
359 autoscroll_value = settings.value('autoscrolling')366 autoscroll_value = settings.value('autoscrolling')
360 for i in range(0, len(self.autoscroll_map)):367 for i in range(0, len(self.autoscroll_map)):
361 if self.autoscroll_map[i] == autoscroll_value:368 if self.autoscroll_map[i] == autoscroll_value and i < self.autoscroll_combo_box.count():
362 self.autoscroll_combo_box.setCurrentIndex(i)369 self.autoscroll_combo_box.setCurrentIndex(i)
363 self.enable_auto_close_check_box.setChecked(settings.value('enable exit confirmation'))370 self.enable_auto_close_check_box.setChecked(settings.value('enable exit confirmation'))
364 self.hide_mouse_check_box.setChecked(settings.value('hide mouse'))371 self.hide_mouse_check_box.setChecked(settings.value('hide mouse'))
@@ -439,7 +446,9 @@
439 settings.setValue('single click preview', self.single_click_preview_check_box.isChecked())446 settings.setValue('single click preview', self.single_click_preview_check_box.isChecked())
440 settings.setValue('single click service preview', self.single_click_service_preview_check_box.isChecked())447 settings.setValue('single click service preview', self.single_click_service_preview_check_box.isChecked())
441 settings.setValue('expand service item', self.expand_service_item_check_box.isChecked())448 settings.setValue('expand service item', self.expand_service_item_check_box.isChecked())
442 settings.setValue('slide max height', self.slide_max_height_spin_box.value())449 slide_max_height_index = self.slide_max_height_combo_box.currentIndex()
450 slide_max_height_value = self.slide_max_height_combo_box.itemData(slide_max_height_index)
451 settings.setValue('slide max height', slide_max_height_value)
443 settings.setValue('autoscrolling', self.autoscroll_map[self.autoscroll_combo_box.currentIndex()])452 settings.setValue('autoscrolling', self.autoscroll_map[self.autoscroll_combo_box.currentIndex()])
444 settings.setValue('enable exit confirmation', self.enable_auto_close_check_box.isChecked())453 settings.setValue('enable exit confirmation', self.enable_auto_close_check_box.isChecked())
445 settings.setValue('hide mouse', self.hide_mouse_check_box.isChecked())454 settings.setValue('hide mouse', self.hide_mouse_check_box.isChecked())
446455
=== modified file 'openlp/core/ui/lib/listpreviewwidget.py'
--- openlp/core/ui/lib/listpreviewwidget.py 2016-05-05 03:57:04 +0000
+++ openlp/core/ui/lib/listpreviewwidget.py 2016-06-02 10:36:58 +0000
@@ -63,6 +63,7 @@
63 # Initialize variables.63 # Initialize variables.
64 self.service_item = ServiceItem()64 self.service_item = ServiceItem()
65 self.screen_ratio = screen_ratio65 self.screen_ratio = screen_ratio
66 self.auto_row_height = 100
66 # Connect signals67 # Connect signals
67 self.verticalHeader().sectionResized.connect(self.row_resized)68 self.verticalHeader().sectionResized.connect(self.row_resized)
6869
@@ -87,8 +88,14 @@
87 height = self.viewport().width() // self.screen_ratio88 height = self.viewport().width() // self.screen_ratio
88 max_img_row_height = Settings().value('advanced/slide max height')89 max_img_row_height = Settings().value('advanced/slide max height')
89 # Adjust for row height cap if in use.90 # Adjust for row height cap if in use.
90 if isinstance(max_img_row_height, int) and max_img_row_height > 0 and height > max_img_row_height:91 if isinstance(max_img_row_height, int):
91 height = max_img_row_height92 if max_img_row_height > 0 and height > max_img_row_height:
93 height = max_img_row_height
94 elif max_img_row_height < 0:
95 # If auto setting, show that number of slides, or if the resulting slides too small, 100px.
96 # E.g. If setting is -4, 4 slides will be visible, unless those slides are < 100px high.
97 self.auto_row_height = max(self.viewport().height() / (-1 * max_img_row_height), 100)
98 height = min(height, self.auto_row_height)
92 # Apply new height to slides99 # Apply new height to slides
93 for frame_number in range(len(self.service_item.get_frames())):100 for frame_number in range(len(self.service_item.get_frames())):
94 self.setRowHeight(frame_number, height)101 self.setRowHeight(frame_number, height)
@@ -99,7 +106,7 @@
99 """106 """
100 # Only for non-text slides when row height cap in use107 # Only for non-text slides when row height cap in use
101 max_img_row_height = Settings().value('advanced/slide max height')108 max_img_row_height = Settings().value('advanced/slide max height')
102 if self.service_item.is_text() or not isinstance(max_img_row_height, int) or max_img_row_height <= 0:109 if self.service_item.is_text() or not isinstance(max_img_row_height, int) or max_img_row_height == 0:
103 return110 return
104 # Get and validate label widget containing slide & adjust max width111 # Get and validate label widget containing slide & adjust max width
105 try:112 try:
@@ -165,11 +172,15 @@
165 slide_height = width // self.screen_ratio172 slide_height = width // self.screen_ratio
166 # Setup and validate row height cap if in use.173 # Setup and validate row height cap if in use.
167 max_img_row_height = Settings().value('advanced/slide max height')174 max_img_row_height = Settings().value('advanced/slide max height')
168 if isinstance(max_img_row_height, int) and max_img_row_height > 0:175 if isinstance(max_img_row_height, int) and max_img_row_height != 0:
169 if slide_height > max_img_row_height:176 if max_img_row_height > 0 and slide_height > max_img_row_height:
177 # Manual Setting
170 slide_height = max_img_row_height178 slide_height = max_img_row_height
171 label.setMaximumWidth(max_img_row_height * self.screen_ratio)179 elif max_img_row_height < 0 and slide_height > self.auto_row_height:
172 label.resize(max_img_row_height * self.screen_ratio, max_img_row_height)180 # Auto Setting
181 slide_height = self.auto_row_height
182 label.setMaximumWidth(slide_height * self.screen_ratio)
183 label.resize(slide_height * self.screen_ratio, slide_height)
173 # Build widget with stretch padding184 # Build widget with stretch padding
174 container = QtWidgets.QWidget()185 container = QtWidgets.QWidget()
175 hbox = QtWidgets.QHBoxLayout()186 hbox = QtWidgets.QHBoxLayout()
176187
=== modified file 'tests/functional/openlp_core_common/test_registryproperties.py'
--- tests/functional/openlp_core_common/test_registryproperties.py 2016-05-31 21:40:13 +0000
+++ tests/functional/openlp_core_common/test_registryproperties.py 2016-06-02 10:36:58 +0000
@@ -75,4 +75,3 @@
7575
76 # THEN the application should be none76 # THEN the application should be none
77 self.assertEqual(self.application, application, 'The application value should match')77 self.assertEqual(self.application, application, 'The application value should match')
78
7978
=== modified file 'tests/functional/openlp_core_ui_lib/test_listpreviewwidget.py'
--- tests/functional/openlp_core_ui_lib/test_listpreviewwidget.py 2016-06-01 21:42:54 +0000
+++ tests/functional/openlp_core_ui_lib/test_listpreviewwidget.py 2016-06-02 10:36:58 +0000
@@ -227,6 +227,44 @@
227227
228 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')228 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
229 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')229 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
230 def test_replace_recalculate_layout_img_auto(self, mocked_setRowHeight, mocked_resizeRowsToContents):
231 """
232 Test if "Max height for non-text slides..." auto, img slides resized in replace_service_item & __recalc...
233 """
234 # GIVEN: A setting to adjust "Max height for non-text slides in slide controller",
235 # an image ServiceItem and a ListPreviewWidget.
236
237 # Mock Settings().value('advanced/slide max height')
238 self.mocked_Settings_obj.value.return_value = -4
239 # Mock self.viewport().width()
240 self.mocked_viewport_obj.width.return_value = 200
241 self.mocked_viewport_obj.height.return_value = 600
242 # Mock image service item
243 service_item = MagicMock()
244 service_item.is_text.return_value = False
245 service_item.is_capable.return_value = False
246 service_item.get_frames.return_value = [{'title': None, 'path': None, 'image': None},
247 {'title': None, 'path': None, 'image': None}]
248 # init ListPreviewWidget and load service item
249 list_preview_widget = ListPreviewWidget(None, 1)
250 list_preview_widget.replace_service_item(service_item, 200, 0)
251 # Change viewport width before forcing a resize
252 self.mocked_viewport_obj.width.return_value = 400
253
254 # WHEN: __recalculate_layout() is called (via screen_size_changed)
255 list_preview_widget.screen_size_changed(1)
256 self.mocked_viewport_obj.height.return_value = 200
257 list_preview_widget.screen_size_changed(1)
258
259 # THEN: resizeRowsToContents() should not be called, while setRowHeight() should be called
260 # twice for each slide.
261 self.assertEquals(mocked_resizeRowsToContents.call_count, 0, 'Should not be called')
262 self.assertEquals(mocked_setRowHeight.call_count, 6, 'Should be called 3 times for each slide')
263 calls = [call(0, 100), call(1, 100), call(0, 150), call(1, 150), call(0, 100), call(1, 100)]
264 mocked_setRowHeight.assert_has_calls(calls)
265
266 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
267 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
230 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.cellWidget')268 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.cellWidget')
231 def test_row_resized_text(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents):269 def test_row_resized_text(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents):
232 """270 """
@@ -331,6 +369,41 @@
331 # THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should be called369 # THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should be called
332 mocked_cellWidget_child.setMaximumWidth.assert_called_once_with(150)370 mocked_cellWidget_child.setMaximumWidth.assert_called_once_with(150)
333371
372 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
373 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
374 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.cellWidget')
375 def test_row_resized_setting_changed(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents):
376 """
377 Test if "Max height for non-text slides..." enabled while item live, program doesn't crash on row_resized.
378 """
379 # GIVEN: A setting to adjust "Max height for non-text slides in slide controller",
380 # an image ServiceItem and a ListPreviewWidget.
381
382 # Mock Settings().value('advanced/slide max height')
383 self.mocked_Settings_obj.value.return_value = 0
384 # Mock self.viewport().width()
385 self.mocked_viewport_obj.width.return_value = 200
386 # Mock image service item
387 service_item = MagicMock()
388 service_item.is_text.return_value = False
389 service_item.is_capable.return_value = False
390 service_item.get_frames.return_value = [{'title': None, 'path': None, 'image': None},
391 {'title': None, 'path': None, 'image': None}]
392 # Mock self.cellWidget().children()
393 mocked_cellWidget_obj = MagicMock()
394 mocked_cellWidget_obj.children.return_value = None
395 mocked_cellWidget.return_value = mocked_cellWidget_obj
396 # init ListPreviewWidget and load service item
397 list_preview_widget = ListPreviewWidget(None, 1)
398 list_preview_widget.replace_service_item(service_item, 200, 0)
399 self.mocked_Settings_obj.value.return_value = 100
400
401 # WHEN: row_resized() is called
402 list_preview_widget.row_resized(0, 100, 150)
403
404 # THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should fail
405 self.assertRaises(Exception)
406
334 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.selectRow')407 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.selectRow')
335 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.scrollToItem')408 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.scrollToItem')
336 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.item')409 @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.item')
337410
=== modified file 'tests/functional/openlp_plugins/bibles/test_lib.py'
--- tests/functional/openlp_plugins/bibles/test_lib.py 2016-06-01 23:14:58 +0000
+++ tests/functional/openlp_plugins/bibles/test_lib.py 2016-06-02 10:36:58 +0000
@@ -43,6 +43,7 @@
43 separators = {'sep_r': '\\s*(?:e)\\s*', 'sep_e_default': 'end', 'sep_v_display': 'w', 'sep_l_display': 'r',43 separators = {'sep_r': '\\s*(?:e)\\s*', 'sep_e_default': 'end', 'sep_v_display': 'w', 'sep_l_display': 'r',
44 'sep_v_default': ':|v|V|verse|verses', 'sep_l': '\\s*(?:r)\\s*', 'sep_l_default': ',|and',44 'sep_v_default': ':|v|V|verse|verses', 'sep_l': '\\s*(?:r)\\s*', 'sep_l_default': ',|and',
45 'sep_e': '\\s*(?:t)\\s*', 'sep_v': '\\s*(?:w)\\s*', 'sep_r_display': 'e', 'sep_r_default': '-|to'}45 'sep_e': '\\s*(?:t)\\s*', 'sep_v': '\\s*(?:w)\\s*', 'sep_r_display': 'e', 'sep_r_default': '-|to'}
46
46 def _update_side_effect():47 def _update_side_effect():
47 """48 """
48 Update the references after mocking out the method49 Update the references after mocking out the method
4950
=== modified file 'tests/functional/openlp_plugins/songs/test_opsproimport.py'
--- tests/functional/openlp_plugins/songs/test_opsproimport.py 2016-06-01 23:14:58 +0000
+++ tests/functional/openlp_plugins/songs/test_opsproimport.py 2016-06-02 10:36:58 +0000
@@ -171,4 +171,3 @@
171 result_data = json.loads(result_file.read().decode())171 result_data = json.loads(result_file.read().decode())
172 self.assertListEqual(importer.verses, _get_item(result_data, 'verses'))172 self.assertListEqual(importer.verses, _get_item(result_data, 'verses'))
173 self.assertListEqual(importer.verse_order_list_generated, _get_item(result_data, 'verse_order_list'))173 self.assertListEqual(importer.verse_order_list_generated, _get_item(result_data, 'verse_order_list'))
174