From e2a0ff5caf99caba25c013626b158a04a12e1e64 Mon Sep 17 00:00:00 2001 From: cona Date: Fri, 24 Jan 2020 09:54:44 +0100 Subject: [PATCH] try to port to pythom 3 --- orbeon_xml_api/__init__.py | 4 - orbeon_xml_api/builder.py | 6 +- orbeon_xml_api/controls.py | 4 +- orbeon_xml_api/runner.py | 86 +++++++++++++++---- orbeon_xml_api/runner_copy_builder_merge.py | 4 - orbeon_xml_api/tests/benchmark_performance.py | 4 - orbeon_xml_api/tests/controls/__init__.py | 4 - .../tests/controls/test_autocomplete.py | 4 - .../tests/controls/test_checkbox_input.py | 4 - .../tests/controls/test_checkboxes.py | 4 - .../tests/controls/test_currency.py | 4 - orbeon_xml_api/tests/controls/test_date.py | 4 - .../tests/controls/test_datetime.py | 4 - .../tests/controls/test_dropdown.py | 4 - .../tests/controls/test_dropdown_date.py | 4 - .../controls/test_dynamic_data_dropdown.py | 4 - orbeon_xml_api/tests/controls/test_email.py | 4 - .../tests/controls/test_fields_date.py | 4 - .../tests/controls/test_file_attachment.py | 4 - .../tests/controls/test_htmlarea.py | 4 - .../tests/controls/test_image_annotation.py | 4 - .../tests/controls/test_image_attachment.py | 4 - orbeon_xml_api/tests/controls/test_input.py | 4 - .../tests/controls/test_input_counter.py | 4 - .../tests/controls/test_link_button.py | 4 - .../tests/controls/test_multiple_list.py | 4 - orbeon_xml_api/tests/controls/test_number.py | 4 - .../tests/controls/test_open_select1.py | 4 - orbeon_xml_api/tests/controls/test_output.py | 4 - .../tests/controls/test_radio_buttons.py | 4 - orbeon_xml_api/tests/controls/test_secret.py | 4 - .../tests/controls/test_standard_button.py | 4 - .../tests/controls/test_static_image.py | 4 - .../tests/controls/test_textarea.py | 4 - .../tests/controls/test_textarea_counter.py | 4 - orbeon_xml_api/tests/controls/test_time.py | 4 - .../tests/controls/test_us_address.py | 4 - .../tests/controls/test_us_phone.py | 4 - .../tests/controls/test_us_state.py | 4 - .../tests/controls/test_yesno_input.py | 4 - ...no-image-attachments-iteration_verion2.xml | 1 - orbeon_xml_api/tests/test_builder.py | 4 - orbeon_xml_api/tests/test_common.py | 4 - .../tests/test_control_subclassing.py | 4 - orbeon_xml_api/tests/test_runner.py | 4 - .../tests/test_runner_merge_builder.py | 4 - orbeon_xml_api/utils.py | 4 - setup.py | 2 +- 48 files changed, 75 insertions(+), 196 deletions(-) diff --git a/orbeon_xml_api/__init__.py b/orbeon_xml_api/__init__.py index b501ab1..3a7c623 100644 --- a/orbeon_xml_api/__init__.py +++ b/orbeon_xml_api/__init__.py @@ -1,6 +1,2 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - # from . import tests from . import builder diff --git a/orbeon_xml_api/builder.py b/orbeon_xml_api/builder.py index c6cfd8f..35cb870 100644 --- a/orbeon_xml_api/builder.py +++ b/orbeon_xml_api/builder.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. + + from lxml import etree @@ -10,7 +10,7 @@ BooleanControl, AnyUriControl, EmailControl, DecimalControl, \ Select1Control, OpenSelect1Control, SelectControl, ImageAnnotationControl from utils import generate_xml_root, unaccent_unicode - +#.ITERITEMS ARE MADE TO ITEMS() # `xforms:` types are here for backwards compatibility. XF_TYPE_CONTROL = { 'xf:string': StringControl, diff --git a/orbeon_xml_api/controls.py b/orbeon_xml_api/controls.py index befce16..085340c 100644 --- a/orbeon_xml_api/controls.py +++ b/orbeon_xml_api/controls.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. + + from datetime import datetime, time from lxml import etree diff --git a/orbeon_xml_api/runner.py b/orbeon_xml_api/runner.py index 7dd3ade..156aee4 100644 --- a/orbeon_xml_api/runner.py +++ b/orbeon_xml_api/runner.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. + + import re from lxml import etree @@ -128,28 +128,80 @@ def set_value(self, name, value): def merge(self, builder_obj, **kwargs): # TODO Move and rebuild into RunnerCopyBuilderMerge (class) + parser = etree.XMLParser(ns_clean=True, encoding='utf-8') + root = etree.XML('
', parser) + no_copy_prefix = kwargs.get('no_copy_prefix', None) + parents = {} - merged_form = builder_obj.get_form_instance_raw() - merged_form = etree.fromstring(merged_form) - - for element in merged_form.iter(): - tag = element.tag - if tag not in ['annotation', 'image']: - if isinstance(tag, basestring): - if no_copy_prefix and tag.startswith(no_copy_prefix): - pass - else: - ov = self.xml_root.xpath('//%s' % tag) - if len(ov) > 0 and ov[0].text: - if len(ov[0].text.strip()) > 0: - element.text = ov[0].text - merge_form_xml = etree.tostring(merged_form) + for tag, element in builder_obj.controls.iteritems(): + if tag in self.builder.controls.keys(): + # k_: Known elements (present in original runner/builder) + k_control = self.builder.controls.get(tag, False) + + if not k_control: + continue + + k_parent_control = k_control._parent + k_form_element = self.get_form_element(tag) + + # Sections (escpecially) + if k_parent_control is None and tag not in parents: + parents[tag] = etree.Element(tag) + root.append(parents[tag]) + + # Controls + if k_form_element is not None: + if k_parent_control is not None and hasattr(k_parent_control, '_bind') and k_parent_control._bind.name not in parents: + k_el_parent = etree.Element(k_parent_control._bind.name) + parents[k_parent_control._bind.name] = k_el_parent + root.append(k_el_parent) + + if no_copy_prefix is not None and re.search(r"^%s" % no_copy_prefix, tag) is not None: + # Instead of the Runner control, add the Builder model_instance + parents[k_parent_control._bind.name].append(k_control._model_instance) + else: + parents[k_parent_control._bind.name].append(k_form_element) + # root.append(k_form_element) + else: + # n_: New elements + n_new_control = builder_obj.controls.get(tag, False) + + if not n_new_control: + continue + + n_parent_control = n_new_control._parent + + # Sections (escpecially) don't have a parent, hence it's
root. + if n_parent_control is None and tag not in parents: + parents[tag] = etree.Element(tag) + root.append(parents[tag]) + elif n_parent_control is not None and hasattr(n_parent_control, '_bind') and n_parent_control._bind.name not in parents: + if n_parent_control._bind.name in builder_obj._form: + n_parent_form_element = builder_obj._form[n_parent_control._bind.name] + n_el_parent = etree.Element(n_parent_form_element.tag) + parents[n_parent_control._bind.name] = n_el_parent + root.append(n_el_parent) + + # Initialize parent + if hasattr(n_parent_control, '_bind') and n_parent_control._bind.name not in parents: + parents[n_parent_control._bind.name] = None + + # Controls + if hasattr(n_parent_control, '_bind') and n_parent_control._bind.name in parents and n_new_control and n_new_control._model_instance is not None: + parents[n_parent_control._bind.name].append(n_new_control._model_instance) + elif n_new_control and hasattr(n_new_control._parent, '_bind'): + parents[n_new_control._parent._bind.name] = n_new_control._model_instance + + # Unicode support + merge_form_xml = etree.tostring(root) merge_form_xml = bytes(bytearray(merge_form_xml, encoding='utf-8')) merged_runner = Runner(merge_form_xml, builder_obj) + return merged_runner + class RunnerForm: def __init__(self, runner): diff --git a/orbeon_xml_api/runner_copy_builder_merge.py b/orbeon_xml_api/runner_copy_builder_merge.py index 16eaf3a..359b2de 100644 --- a/orbeon_xml_api/runner_copy_builder_merge.py +++ b/orbeon_xml_api/runner_copy_builder_merge.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - class RunnerCopyBuilderMerge: def __init__(self, runner, builder, **kwargs): diff --git a/orbeon_xml_api/tests/benchmark_performance.py b/orbeon_xml_api/tests/benchmark_performance.py index d65aa85..a259ad8 100644 --- a/orbeon_xml_api/tests/benchmark_performance.py +++ b/orbeon_xml_api/tests/benchmark_performance.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - import unittest from ..builder import Builder diff --git a/orbeon_xml_api/tests/controls/__init__.py b/orbeon_xml_api/tests/controls/__init__.py index 204b0d9..1002e8c 100644 --- a/orbeon_xml_api/tests/controls/__init__.py +++ b/orbeon_xml_api/tests/controls/__init__.py @@ -1,6 +1,2 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from ..test_common import CommonTestCase from ...controls import * diff --git a/orbeon_xml_api/tests/controls/test_autocomplete.py b/orbeon_xml_api/tests/controls/test_autocomplete.py index 43ec67c..f96c128 100644 --- a/orbeon_xml_api/tests/controls/test_autocomplete.py +++ b/orbeon_xml_api/tests/controls/test_autocomplete.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_checkbox_input.py b/orbeon_xml_api/tests/controls/test_checkbox_input.py index 4669355..ef34019 100644 --- a/orbeon_xml_api/tests/controls/test_checkbox_input.py +++ b/orbeon_xml_api/tests/controls/test_checkbox_input.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import BooleanControl diff --git a/orbeon_xml_api/tests/controls/test_checkboxes.py b/orbeon_xml_api/tests/controls/test_checkboxes.py index 3857969..7027e0f 100644 --- a/orbeon_xml_api/tests/controls/test_checkboxes.py +++ b/orbeon_xml_api/tests/controls/test_checkboxes.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import SelectControl diff --git a/orbeon_xml_api/tests/controls/test_currency.py b/orbeon_xml_api/tests/controls/test_currency.py index 4a2e794..0dab3b2 100644 --- a/orbeon_xml_api/tests/controls/test_currency.py +++ b/orbeon_xml_api/tests/controls/test_currency.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import DecimalControl diff --git a/orbeon_xml_api/tests/controls/test_date.py b/orbeon_xml_api/tests/controls/test_date.py index e362ba1..0b47ff2 100644 --- a/orbeon_xml_api/tests/controls/test_date.py +++ b/orbeon_xml_api/tests/controls/test_date.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from datetime import datetime from lxml import etree diff --git a/orbeon_xml_api/tests/controls/test_datetime.py b/orbeon_xml_api/tests/controls/test_datetime.py index 1513254..2084928 100644 --- a/orbeon_xml_api/tests/controls/test_datetime.py +++ b/orbeon_xml_api/tests/controls/test_datetime.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from datetime import datetime from lxml import etree diff --git a/orbeon_xml_api/tests/controls/test_dropdown.py b/orbeon_xml_api/tests/controls/test_dropdown.py index afb100b..631e137 100644 --- a/orbeon_xml_api/tests/controls/test_dropdown.py +++ b/orbeon_xml_api/tests/controls/test_dropdown.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import Select1Control diff --git a/orbeon_xml_api/tests/controls/test_dropdown_date.py b/orbeon_xml_api/tests/controls/test_dropdown_date.py index 9639f6c..326f637 100644 --- a/orbeon_xml_api/tests/controls/test_dropdown_date.py +++ b/orbeon_xml_api/tests/controls/test_dropdown_date.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from datetime import datetime from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_dynamic_data_dropdown.py b/orbeon_xml_api/tests/controls/test_dynamic_data_dropdown.py index af26d25..8b5ca0d 100644 --- a/orbeon_xml_api/tests/controls/test_dynamic_data_dropdown.py +++ b/orbeon_xml_api/tests/controls/test_dynamic_data_dropdown.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_email.py b/orbeon_xml_api/tests/controls/test_email.py index 681d3b6..e020416 100644 --- a/orbeon_xml_api/tests/controls/test_email.py +++ b/orbeon_xml_api/tests/controls/test_email.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_fields_date.py b/orbeon_xml_api/tests/controls/test_fields_date.py index b432cd8..0783aae 100644 --- a/orbeon_xml_api/tests/controls/test_fields_date.py +++ b/orbeon_xml_api/tests/controls/test_fields_date.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from datetime import datetime from lxml import etree diff --git a/orbeon_xml_api/tests/controls/test_file_attachment.py b/orbeon_xml_api/tests/controls/test_file_attachment.py index 5a3b4f0..05d18db 100644 --- a/orbeon_xml_api/tests/controls/test_file_attachment.py +++ b/orbeon_xml_api/tests/controls/test_file_attachment.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_htmlarea.py b/orbeon_xml_api/tests/controls/test_htmlarea.py index 731fa46..fa5bc26 100644 --- a/orbeon_xml_api/tests/controls/test_htmlarea.py +++ b/orbeon_xml_api/tests/controls/test_htmlarea.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_image_annotation.py b/orbeon_xml_api/tests/controls/test_image_annotation.py index c9e93d9..9cbb061 100644 --- a/orbeon_xml_api/tests/controls/test_image_annotation.py +++ b/orbeon_xml_api/tests/controls/test_image_annotation.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from collections import OrderedDict from lxml import etree diff --git a/orbeon_xml_api/tests/controls/test_image_attachment.py b/orbeon_xml_api/tests/controls/test_image_attachment.py index f5355f8..4ef186d 100644 --- a/orbeon_xml_api/tests/controls/test_image_attachment.py +++ b/orbeon_xml_api/tests/controls/test_image_attachment.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import AnyUriControl diff --git a/orbeon_xml_api/tests/controls/test_input.py b/orbeon_xml_api/tests/controls/test_input.py index 9920ba4..3bb8854 100644 --- a/orbeon_xml_api/tests/controls/test_input.py +++ b/orbeon_xml_api/tests/controls/test_input.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_input_counter.py b/orbeon_xml_api/tests/controls/test_input_counter.py index 6186e94..0995692 100644 --- a/orbeon_xml_api/tests/controls/test_input_counter.py +++ b/orbeon_xml_api/tests/controls/test_input_counter.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_link_button.py b/orbeon_xml_api/tests/controls/test_link_button.py index 6e9157f..e33d0f0 100644 --- a/orbeon_xml_api/tests/controls/test_link_button.py +++ b/orbeon_xml_api/tests/controls/test_link_button.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_multiple_list.py b/orbeon_xml_api/tests/controls/test_multiple_list.py index 92e24ea..9717cc8 100644 --- a/orbeon_xml_api/tests/controls/test_multiple_list.py +++ b/orbeon_xml_api/tests/controls/test_multiple_list.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from lxml import etree from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_number.py b/orbeon_xml_api/tests/controls/test_number.py index ef87c4c..ad027d7 100644 --- a/orbeon_xml_api/tests/controls/test_number.py +++ b/orbeon_xml_api/tests/controls/test_number.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import DecimalControl diff --git a/orbeon_xml_api/tests/controls/test_open_select1.py b/orbeon_xml_api/tests/controls/test_open_select1.py index 669d67d..9a46bd0 100644 --- a/orbeon_xml_api/tests/controls/test_open_select1.py +++ b/orbeon_xml_api/tests/controls/test_open_select1.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import OpenSelect1Control diff --git a/orbeon_xml_api/tests/controls/test_output.py b/orbeon_xml_api/tests/controls/test_output.py index 89fe345..e4b2989 100644 --- a/orbeon_xml_api/tests/controls/test_output.py +++ b/orbeon_xml_api/tests/controls/test_output.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_radio_buttons.py b/orbeon_xml_api/tests/controls/test_radio_buttons.py index 01a0fbf..a5bf875 100644 --- a/orbeon_xml_api/tests/controls/test_radio_buttons.py +++ b/orbeon_xml_api/tests/controls/test_radio_buttons.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import Select1Control diff --git a/orbeon_xml_api/tests/controls/test_secret.py b/orbeon_xml_api/tests/controls/test_secret.py index 6a58250..42a0ee3 100644 --- a/orbeon_xml_api/tests/controls/test_secret.py +++ b/orbeon_xml_api/tests/controls/test_secret.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_standard_button.py b/orbeon_xml_api/tests/controls/test_standard_button.py index 52a4884..546fe51 100644 --- a/orbeon_xml_api/tests/controls/test_standard_button.py +++ b/orbeon_xml_api/tests/controls/test_standard_button.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_static_image.py b/orbeon_xml_api/tests/controls/test_static_image.py index c0c189d..58c7ef5 100644 --- a/orbeon_xml_api/tests/controls/test_static_image.py +++ b/orbeon_xml_api/tests/controls/test_static_image.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from collections import OrderedDict from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_textarea.py b/orbeon_xml_api/tests/controls/test_textarea.py index be8ffa6..aaa725c 100644 --- a/orbeon_xml_api/tests/controls/test_textarea.py +++ b/orbeon_xml_api/tests/controls/test_textarea.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_textarea_counter.py b/orbeon_xml_api/tests/controls/test_textarea_counter.py index 15856ba..5b0a316 100644 --- a/orbeon_xml_api/tests/controls/test_textarea_counter.py +++ b/orbeon_xml_api/tests/controls/test_textarea_counter.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_time.py b/orbeon_xml_api/tests/controls/test_time.py index 0875fad..3677856 100644 --- a/orbeon_xml_api/tests/controls/test_time.py +++ b/orbeon_xml_api/tests/controls/test_time.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from datetime import datetime from lxml import etree diff --git a/orbeon_xml_api/tests/controls/test_us_address.py b/orbeon_xml_api/tests/controls/test_us_address.py index 02dc5e8..6da9171 100644 --- a/orbeon_xml_api/tests/controls/test_us_address.py +++ b/orbeon_xml_api/tests/controls/test_us_address.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_us_phone.py b/orbeon_xml_api/tests/controls/test_us_phone.py index 26c42be..c770e6b 100644 --- a/orbeon_xml_api/tests/controls/test_us_phone.py +++ b/orbeon_xml_api/tests/controls/test_us_phone.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import StringControl diff --git a/orbeon_xml_api/tests/controls/test_us_state.py b/orbeon_xml_api/tests/controls/test_us_state.py index f38e209..f133b7d 100644 --- a/orbeon_xml_api/tests/controls/test_us_state.py +++ b/orbeon_xml_api/tests/controls/test_us_state.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase diff --git a/orbeon_xml_api/tests/controls/test_yesno_input.py b/orbeon_xml_api/tests/controls/test_yesno_input.py index a61594f..7b1ca1a 100644 --- a/orbeon_xml_api/tests/controls/test_yesno_input.py +++ b/orbeon_xml_api/tests/controls/test_yesno_input.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2017-2018 Bob Leers (http://www.novacode.nl) -# See LICENSE file for full licensing details. - from . import CommonTestCase from ..controls import BooleanControl diff --git a/orbeon_xml_api/tests/data/test_controls_builder_no-image-attachments-iteration_verion2.xml b/orbeon_xml_api/tests/data/test_controls_builder_no-image-attachments-iteration_verion2.xml index 76eaae0..7a7dd97 100644 --- a/orbeon_xml_api/tests/data/test_controls_builder_no-image-attachments-iteration_verion2.xml +++ b/orbeon_xml_api/tests/data/test_controls_builder_no-image-attachments-iteration_verion2.xml @@ -22,7 +22,6 @@ <p>Moved by the death of compatriot&nbsp;<a shape="rect" title="Alessandro Manzoni" href="https://en.wikipedia.org/wiki/Alessandro_Manzoni">Alessandro Manzoni</a>, Verdi wrote&nbsp;<em><a shape="rect" title="Requiem (Verdi)" href="https://en.wikipedia.org/wiki/Requiem_(Verdi)">Messa da Requiem</a></em>&nbsp;in 1874 in Manzoni's honour, a work now regarded as a masterpiece of the&nbsp;<a shape="rect" title="Oratorio" href="https://en.wikipedia.org/wiki/Oratorio">oratorio</a>&nbsp;tradition and a testimony to his capacity outside the field of opera.&nbsp;Visionary and politically engaged, he remains – alongside&nbsp;<a shape="rect" title="Giuseppe Garibaldi" href="https://en.wikipedia.org/wiki/Giuseppe_Garibaldi">Garibaldi</a>&nbsp;and&nbsp;<a shape="rect" title="Camillo Benso, Count of Cavour" href="https://en.wikipedia.org/wiki/Camillo_Benso,_Count_of_Cavour">Cavour</a>&nbsp;– an emblematic figure of the reunification process of the&nbsp;<a shape="rect" class="mw-redirect" title="Italian peninsula" href="https://en.wikipedia.org/wiki/Italian_peninsula">Italian peninsula</a>&nbsp;(the&nbsp;<em><a shape="rect" class="mw-redirect" title="Risorgimento" href="https://en.wikipedia.org/wiki/Risorgimento">Risorgimento</a></em>).</p> </div> - Michelle This must not be "too long"!