diff --git a/README b/README index 588fc356591532453b7521936b82eae76a6a8cc0..295bc42192e31e78687f0feedc21cf249da76544 100644 --- a/README +++ b/README @@ -141,12 +141,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Change history -------------- -Version 2.23c (10/05/2016) +Version 2.23c (10/13/2016) - Added entry_points to setup.py so that distutils will generate executable scripts for executable .py files (for example, generateDS.py and process_includes.py). Thanks to Michael Jenny for suggesting this and for showing the way to do it. +- Fixed function call signature mismatch in MixedContainer call to + export method. Thanks to Lev Israel for catching this and + providing the solution. Version 2.23b (09/26/2016) diff --git a/generateDS.html b/generateDS.html index 02e5c5f1dfea589c6319d65763f99bb332f63fdc..e58fca60076fd676e61676a62f233b81d4922c22 100644 --- a/generateDS.html +++ b/generateDS.html @@ -229,7 +229,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">October 05, 2016</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">October 13, 2016</td> </tr> </tbody> </table> @@ -3180,7 +3180,7 @@ following among others:</p> <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateDS.txt">View document source</a>. -Generated on: 2016-10-05 22:04 UTC. +Generated on: 2016-10-13 22:29 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/generateDS.py b/generateDS.py index 03b167975ad6adcfb401cfe7147cd9f2e27306d0..9aa3fa883b779ddb569d05938a8eb3653163e111 100755 --- a/generateDS.py +++ b/generateDS.py @@ -5457,7 +5457,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/generateds_gui_notes.html b/generateds_gui_notes.html index c40dc24e0206114ad8c79f3bdb3157aba69b49e8..4906de597c2b4de124006be01a4a12c531e1f462 100644 --- a/generateds_gui_notes.html +++ b/generateds_gui_notes.html @@ -229,7 +229,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">October 05, 2016</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">October 13, 2016</td> </tr> </tbody> </table> @@ -401,7 +401,7 @@ $ mv generateds_gui.mo locale/ru/LC_MESSAGES/ <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateds_gui_notes.txt">View document source</a>. -Generated on: 2016-10-05 22:04 UTC. +Generated on: 2016-10-13 22:29 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/librarytemplate_howto.html b/librarytemplate_howto.html index 0316f0f9ca062cbbd4855fa5c4d0e579c8b8e7df..84adafcd42f27ecc31f10897b38851ada8145187 100644 --- a/librarytemplate_howto.html +++ b/librarytemplate_howto.html @@ -226,7 +226,7 @@ dkuhlman (at) davekuhlman (dot) org <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">October 05, 2016</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">October 13, 2016</td> </tr> </tbody> </table> @@ -380,7 +380,7 @@ this command for your needs. For example, you may need to use <div class="footer"> <hr class="footer" /> <a class="reference external" href="librarytemplate_howto.txt">View document source</a>. -Generated on: 2016-10-05 22:04 UTC. +Generated on: 2016-10-13 22:29 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/tests/OnePer/oneperType00_2One.py b/tests/OnePer/oneperType00_2One.py index 9bd40496f24f712738042666103d303341b317ef..bb1a48b883256b4f0e0ff35ef732f5cfdde5cc00 100644 --- a/tests/OnePer/oneperType00_2One.py +++ b/tests/OnePer/oneperType00_2One.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/OnePer/oneperType01_2One.py b/tests/OnePer/oneperType01_2One.py index e05090db7e3a60abf80b788915d7ea41b0fed0d3..af44b2c5e709b938e9dbc9d02e3596428f4b0c78 100644 --- a/tests/OnePer/oneperType01_2One.py +++ b/tests/OnePer/oneperType01_2One.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/OnePer/oneperType02_2One.py b/tests/OnePer/oneperType02_2One.py index 0e4b4ded4c9ad70393b3b4f2c86eb52c43aa2ea7..4c66103e4f17a40b6a0a4ff026cc2a7e82e06eef 100644 --- a/tests/OnePer/oneperType02_2One.py +++ b/tests/OnePer/oneperType02_2One.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/OnePer/oneperType03_2One.py b/tests/OnePer/oneperType03_2One.py index ba20f12179f45312b01540c5d6a9a105af0ef435..bc486fd969fc6832a51060f0a0ad986e4b16eb12 100644 --- a/tests/OnePer/oneperType03_2One.py +++ b/tests/OnePer/oneperType03_2One.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/abstract_type1_sup.py b/tests/abstract_type1_sup.py index 4c11a20b71d735564f06f4ea2e54846e12fa938e..26052273d6bb121f8265becae5545a8ae950d734 100644 --- a/tests/abstract_type1_sup.py +++ b/tests/abstract_type1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/annotations1_sup.py b/tests/annotations1_sup.py index f6b61751e9d3733b27a946cf280c2a83320a88ca..5c615e2874ea8e8245881e34c552e7ea32651153 100644 --- a/tests/annotations1_sup.py +++ b/tests/annotations1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/anonymous_type1_sup.py b/tests/anonymous_type1_sup.py index 866370c1bbf6ddcff3c5208dd2c05cb296367be1..565f1d0ad0548a6b885d0f34c8b927a07d77e3d2 100644 --- a/tests/anonymous_type1_sup.py +++ b/tests/anonymous_type1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/anysimpletype1_sup.py b/tests/anysimpletype1_sup.py index 272aff7d91727488fc7e625f9df4beea77ac7261..bc66620da5de4ebcb2e239ea5d3bf30c1b1d8bfd 100644 --- a/tests/anysimpletype1_sup.py +++ b/tests/anysimpletype1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/anywildcard1_sup.py b/tests/anywildcard1_sup.py index 5a07f80e3c5df5352f2e32f764485804f94177a4..872cf51355ebeeae286017d6f8d601190c11ebc8 100644 --- a/tests/anywildcard1_sup.py +++ b/tests/anywildcard1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/attr_groups1_sup.py b/tests/attr_groups1_sup.py index 448892ecf4299fc6f1101d841c02b6206aa0d0e2..2de44a58081922cf2d0624ff4ac50c1d4a2e3aa6 100644 --- a/tests/attr_groups1_sup.py +++ b/tests/attr_groups1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/catalogtest1_sup.py b/tests/catalogtest1_sup.py index d3b484e7cc6d196f3fd6603087ec9d0e566ef00d..8cd42d39321eb8504ea264deac6acad4a94a7970 100644 --- a/tests/catalogtest1_sup.py +++ b/tests/catalogtest1_sup.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/cdata1_sup.py b/tests/cdata1_sup.py index 6cc7968119b3991bf9bbad16b1f4c7f36058b19d..b991443322748a974d798689db8d7c0a9da92f4c 100644 --- a/tests/cdata1_sup.py +++ b/tests/cdata1_sup.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/cleanupname1_sup.py b/tests/cleanupname1_sup.py index 694dc33d3ddd590087bb0bf3b9134d3afc86e568..e1a5c88bcf088741efb12ad0e966724226a50928 100644 --- a/tests/cleanupname1_sup.py +++ b/tests/cleanupname1_sup.py @@ -547,7 +547,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/copy_all b/tests/copy_all index f62e238a39eac2c03e97e527c9ea7a00defe4f05..62b953ada9ffe2857243fa1860527d3ee1366558 100755 --- a/tests/copy_all +++ b/tests/copy_all @@ -53,3 +53,5 @@ cp nested_def2_sup.py nested_def1_sup.py cp nested_def2_sub.py nested_def1_sub.py cp cleanupname2_sup.py cleanupname1_sup.py cp cleanupname2_sub.py cleanupname1_sub.py +cp catalogtest2_sup.py catalogtest1_sup.py +cp catalogtest2_sub.py catalogtest1_sub.py diff --git a/tests/defaults_cases1_sup.py b/tests/defaults_cases1_sup.py index 55874827c9177ff9ae5def096684e7f655eb4d95..82d9b6d65cbcc22372aad2ed509a9ca68fe9f884 100644 --- a/tests/defaults_cases1_sup.py +++ b/tests/defaults_cases1_sup.py @@ -545,7 +545,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/defaults_coverage1_sup.py b/tests/defaults_coverage1_sup.py index 53181cf65693b46e1b8a825adf11c1cb3a083c9c..ddec7e9d02f81c15275bd29eb8e4e494fd63bf24 100644 --- a/tests/defaults_coverage1_sup.py +++ b/tests/defaults_coverage1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/extensions1_sup.py b/tests/extensions1_sup.py index f19e9c8c8544505b3889adc6186fd7df33448778..99264738d5987bb15ecfce258f32ada2353d471d 100644 --- a/tests/extensions1_sup.py +++ b/tests/extensions1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/ipo1_sup.py b/tests/ipo1_sup.py index 2356f805f27fb508a456356798689ed6b614536f..a828cbab1c17a3a7599b376fcfbbb7192d71764a 100644 --- a/tests/ipo1_sup.py +++ b/tests/ipo1_sup.py @@ -545,7 +545,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/ipo2_sup.py b/tests/ipo2_sup.py index 2356f805f27fb508a456356798689ed6b614536f..a828cbab1c17a3a7599b376fcfbbb7192d71764a 100644 --- a/tests/ipo2_sup.py +++ b/tests/ipo2_sup.py @@ -545,7 +545,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/mapcleanname1_sup.py b/tests/mapcleanname1_sup.py index 17eb97517b142d11351f03c9ad580945e3ef5c7a..d7837d399a38584e23e66c9fcbd7e4789a0be8ab 100644 --- a/tests/mapcleanname1_sup.py +++ b/tests/mapcleanname1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/nested_def1_sup.py b/tests/nested_def1_sup.py index cf12e33f7197c6b1fa6a5cdcfb385de89394234d..fed05aa38314aa73addae7ea300fefab65510fe2 100644 --- a/tests/nested_def1_sup.py +++ b/tests/nested_def1_sup.py @@ -545,7 +545,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/out1_sup.py b/tests/out1_sup.py index bb25128089aa9a5bc7a464093fa5c9ffa5882cd1..e9dc161d34b042eee80b6ec9b03728e9cb98e129 100644 --- a/tests/out1_sup.py +++ b/tests/out1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( @@ -1832,7 +1833,10 @@ class programmer(person): self.eldatetime = dval_ elif nodeName_ == 'eltoken': eltoken_ = child_.text - eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + if eltoken_: + eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + else: + eltoken_ = "" eltoken_ = self.gds_validate_string(eltoken_, node, 'eltoken') self.eltoken = eltoken_ elif nodeName_ == 'elshort': diff --git a/tests/people_procincl1_sup.py b/tests/people_procincl1_sup.py index 9c13fe10203f302aa25539df887f1fe2adbaab9e..996caa34849f4df0af9b79c0d3aefc385115774f 100644 --- a/tests/people_procincl1_sup.py +++ b/tests/people_procincl1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( @@ -2471,7 +2472,10 @@ class programmer(person): self.eldate = dval_ elif nodeName_ == 'eltoken': eltoken_ = child_.text - eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + if eltoken_: + eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + else: + eltoken_ = "" eltoken_ = self.gds_validate_string(eltoken_, node, 'eltoken') self.eltoken = eltoken_ elif nodeName_ == 'elshort': diff --git a/tests/prefix_classname1_sup.py b/tests/prefix_classname1_sup.py index 7037b511ddb9d27f4c59ec19a6186414a135ed52..fa179c1cb400e574e86b2a5ece27e5ee817d1ce6 100644 --- a/tests/prefix_classname1_sup.py +++ b/tests/prefix_classname1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( @@ -1459,7 +1460,10 @@ class tomato_programmer(tomato_person): self.eldatetime = dval_ elif nodeName_ == 'eltoken': eltoken_ = child_.text - eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + if eltoken_: + eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + else: + eltoken_ = "" eltoken_ = self.gds_validate_string(eltoken_, node, 'eltoken') self.eltoken = eltoken_ elif nodeName_ == 'elshort': diff --git a/tests/recursive_simpletype1_sup.py b/tests/recursive_simpletype1_sup.py index 56a674c99ff0f0aefa24a9d835d5f6e1852a238e..06c6f8c9fc4a67b6e0c2e9dd101544bc459d0561 100644 --- a/tests/recursive_simpletype1_sup.py +++ b/tests/recursive_simpletype1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/reference_simpletype1_sup.py b/tests/reference_simpletype1_sup.py index 56ef4af75253e1a0aa61858740de95d4e84ec756..e27710fab4e28df6f91d7990485e114f2a1b2f82 100644 --- a/tests/reference_simpletype1_sup.py +++ b/tests/reference_simpletype1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/simplecontent_restriction1_sup.py b/tests/simplecontent_restriction1_sup.py index 6853e6304d575dedf9a70b7459c544fae422d762..e9e28c955d06b354bb6ef0993333f753e50bde0e 100644 --- a/tests/simplecontent_restriction1_sup.py +++ b/tests/simplecontent_restriction1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/simpletype_memberspecs1_sup.py b/tests/simpletype_memberspecs1_sup.py index faf9c401151faf3cba26e6858b1148a9b88abe98..fc9e39c126c9b0988372a03b85d12ad8188f2922 100644 --- a/tests/simpletype_memberspecs1_sup.py +++ b/tests/simpletype_memberspecs1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/simpletypes_other1_sup.py b/tests/simpletypes_other1_sup.py index e7459e72152a78e2ae264858be3ef1a634d295da..7431c185516534425ad5494a704bf087a405fa5a 100644 --- a/tests/simpletypes_other1_sup.py +++ b/tests/simpletypes_other1_sup.py @@ -546,7 +546,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/test.py b/tests/test.py index 71a7463ebff28125bb6044b0759e754166a8085b..7558302bc322507b7db12a877133efbc7057683f 100755 --- a/tests/test.py +++ b/tests/test.py @@ -62,8 +62,8 @@ class GenTest(unittest.TestCase): self.compareFiles('out1_sup.py', 'out2_sup.py', ignore=()) self.compareFiles('out1_sub.py', 'out2_sub.py') # cleanup generated files - os.remove('out2_sup.py') - os.remove('out2_sub.py') + self.remove('out2_sup.py') + self.remove('out2_sub.py') def test_003_element_groups(self): cmdTempl = ( @@ -103,8 +103,8 @@ class GenTest(unittest.TestCase): ['value 2 1', 'group1 2', 'group2 2', 'value 2 2'] """) # cleanup generated files - os.remove('{}_sup.py'.format(t_)) - os.remove('{}_sub.py'.format(t_)) + self.remove('{}_sup.py'.format(t_)) + self.remove('{}_sub.py'.format(t_)) def test_004_valueof(self): cmdTempl = ( @@ -155,8 +155,8 @@ class GenTest(unittest.TestCase): ('child1', 'value1') """) # cleanup generated files - os.remove('{}_sup.py'.format(t_)) - os.remove('{}_sub.py'.format(t_)) + self.remove('{}_sup.py'.format(t_)) + self.remove('{}_sub.py'.format(t_)) ns_for_import_xml1 = """\ <root xmlns="http://a" xmlns:bl="http://blah"> @@ -212,8 +212,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('anysimpletype1_sub.py', '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_007_simpletype_memberspecs(self): cmdTempl = ( @@ -231,8 +231,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_008_extensions(self): cmdTempl = ( @@ -250,8 +250,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_009_literal(self): cmd = ( @@ -275,9 +275,9 @@ class GenTest(unittest.TestCase): infile.close() self.failUnlessEqual(content1, content2) # cleanup generated files - os.remove('literal2.py') - os.remove('out2_sup.py') - os.remove('out2_sub.py') + self.remove('literal2.py') + self.remove('out2_sup.py') + self.remove('out2_sub.py') def test_010_simplecontent_restriction(self): cmdTempl = ( @@ -295,8 +295,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_011_annotations(self): cmdTempl = ( @@ -314,8 +314,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_012_abstract_type(self): cmdTempl = ( @@ -333,8 +333,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_013_people_procincl(self): cmdTempl = ( @@ -353,8 +353,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_014_ipo(self): cmdTempl = ( @@ -376,7 +376,7 @@ class GenTest(unittest.TestCase): self.executeClean(cmd, cwd='..') self.compareFiles('{}1_out.xml'.format(t_), '{}2_out.xml'.format(t_)) # cleanup generated files - os.remove('{}2_out.xml'.format(t_)) + self.remove('{}2_out.xml'.format(t_)) def test_015_recursive_simpletype(self): cmdTempl = ( @@ -395,8 +395,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_016_anywildcard(self): cmdTempl = ( @@ -415,8 +415,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_017_attr_groups(self): cmdTempl = ( @@ -435,8 +435,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_018_simpletypes_other(self): cmdTempl = ( @@ -455,8 +455,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_019_to_etree(self): cmdTempl = ( @@ -486,9 +486,9 @@ class GenTest(unittest.TestCase): outfile.close() self.compareFiles('{}1.xml'.format(t_), '{}2.xml'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) - os.remove('{}2.xml'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) + self.remove('{}2.xml'.format(t_)) def test_020_catalogtest(self): cmdTempl = ( @@ -508,8 +508,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_021_anonymous_type(self): cmdTempl = ( @@ -528,8 +528,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_022_one_per(self): cmdTempl = ( @@ -560,10 +560,10 @@ class GenTest(unittest.TestCase): 'OnePer{}{}Type03_2One.py'.format(os.sep, t_), ('sys.stdout.write',)) # cleanup generated files - os.remove('OnePer{}{}Type00_1One.py'.format(os.sep, t_)) - os.remove('OnePer{}{}Type01_1One.py'.format(os.sep, t_)) - os.remove('OnePer{}{}Type02_1One.py'.format(os.sep, t_)) - os.remove('OnePer{}{}Type03_1One.py'.format(os.sep, t_)) + self.remove('OnePer{}{}Type00_1One.py'.format(os.sep, t_)) + self.remove('OnePer{}{}Type01_1One.py'.format(os.sep, t_)) + self.remove('OnePer{}{}Type02_1One.py'.format(os.sep, t_)) + self.remove('OnePer{}{}Type03_1One.py'.format(os.sep, t_)) def test_023_mapcleanname(self): cmdTempl = ( @@ -582,8 +582,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_024_prefix_classname(self): cmdTempl = ( @@ -607,9 +607,9 @@ class GenTest(unittest.TestCase): self.executeClean(cmd, cwd='..') self.compareFiles('{}1_out.xml'.format(t_), '{}2_out.xml'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) - os.remove('{}2_out.xml'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_out.xml'.format(t_)) def test_025_validate_simpletypes(self): cmdTempl = ( @@ -638,8 +638,8 @@ class GenTest(unittest.TestCase): self.compareFiles( '{}1_warnings.txt'.format(t_), '{}2_warnings.txt'.format(t_)) # cleanup generated files - os.remove('{}2_out.xml'.format(t_)) - os.remove('{}2_warnings.txt'.format(t_)) + self.remove('{}2_out.xml'.format(t_)) + self.remove('{}2_warnings.txt'.format(t_)) def test_026_reference_simpletype(self): cmdTempl = ( @@ -658,8 +658,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_027_cdata(self): cmdTempl = ( @@ -694,9 +694,9 @@ class GenTest(unittest.TestCase): cdatalist.export(outfile, 0) self.compareFiles('{}1.xml'.format(t_), '{}2.xml'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) - os.remove('{}2.xml'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) + self.remove('{}2.xml'.format(t_)) def test_028_defaults_coverage(self): cmdTempl = ( @@ -715,8 +715,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def test_029_defaults_cases(self): cmdTempl = ( @@ -739,9 +739,9 @@ class GenTest(unittest.TestCase): self.executeClean(cmd, cwd='..') self.compareFiles('{}1_out.xml'.format(t_), '{}2_out.xml'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) - os.remove('{}2_out.xml'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_out.xml'.format(t_)) def test_030_nested_def(self): cmdTempl = ( @@ -765,9 +765,9 @@ class GenTest(unittest.TestCase): self.executeClean(cmd, cwd='..') self.compareFiles('{}1_out.xml'.format(t_), '{}2_out.xml'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) - os.remove('{}2_out.xml'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_out.xml'.format(t_)) # # Test enhancements to cleanupName function. @@ -794,8 +794,8 @@ class GenTest(unittest.TestCase): ('sys.stdout.write',)) self.compareFiles('{}1_sub.py'.format(t_), '{}2_sub.py'.format(t_)) # cleanup generated files - os.remove('{}2_sup.py'.format(t_)) - os.remove('{}2_sub.py'.format(t_)) + self.remove('{}2_sup.py'.format(t_)) + self.remove('{}2_sub.py'.format(t_)) def compareFiles(self, left, right, ignore=None): with open(left) as left_file: @@ -807,6 +807,9 @@ class GenTest(unittest.TestCase): diffs = ''.join(diffs[2:12]) self.fail("Files differed:\n{}".format(diffs)) + def remove(self, filename): + os.remove(filename) + # Make the test suite. def suite(): diff --git a/tests/to_etree1_sup.py b/tests/to_etree1_sup.py index b51a98f502b3aa64d8f872caac930a39d365e11f..6d0f7c6f3e76c24450a80a4dfdfe11b48b14f6dc 100644 --- a/tests/to_etree1_sup.py +++ b/tests/to_etree1_sup.py @@ -548,7 +548,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( @@ -1511,7 +1512,10 @@ class programmerType(personType): self.eldatetime1 = dval_ elif nodeName_ == 'eltoken': eltoken_ = child_.text - eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + if eltoken_: + eltoken_ = re_.sub(String_cleanup_pat_, " ", eltoken_).strip() + else: + eltoken_ = "" eltoken_ = self.gds_validate_string(eltoken_, node, 'eltoken') self.eltoken = eltoken_ elif nodeName_ == 'elshort': diff --git a/tests/validate_simpletypes1_sup.py b/tests/validate_simpletypes1_sup.py index bdfb38bff9b5ff6619df88bae8cce2c3536883ab..3659a7d16792534849d484f4d01d0e99283d58df 100644 --- a/tests/validate_simpletypes1_sup.py +++ b/tests/validate_simpletypes1_sup.py @@ -545,7 +545,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tests/validate_simpletypes1_warnings.txt b/tests/validate_simpletypes1_warnings.txt index 7b272bcb6fe0db75c44eec92a942393cc9ca2333..6f65004dfb076ce9acf5514a3a99a22654fcb508 100644 --- a/tests/validate_simpletypes1_warnings.txt +++ b/tests/validate_simpletypes1_warnings.txt @@ -1,58 +1,58 @@ -tests/validate_simpletypes2_sup.py:980: UserWarning: Value "2" does not match xsd minExclusive restriction on integer_range_1_st +tests/validate_simpletypes2_sup.py:981: UserWarning: Value "2" does not match xsd minExclusive restriction on integer_range_1_st warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on integer_range_1_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:990: UserWarning: Value "mmaaa1234mnopzzz" does not match xsd pattern restrictions: [['^aaa.*zzz$', '^bbb.*xxx$'], ['^.*123.*$', '^.*456.*$']] +tests/validate_simpletypes2_sup.py:991: UserWarning: Value "mmaaa1234mnopzzz" does not match xsd pattern restrictions: [['^aaa.*zzz$', '^bbb.*xxx$'], ['^.*123.*$', '^.*456.*$']] warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_pattern_st_patterns_, )) -tests/validate_simpletypes2_sup.py:1003: UserWarning: Value "floatxx" does not match xsd enumeration restriction on token_enum_st +tests/validate_simpletypes2_sup.py:1004: UserWarning: Value "floatxx" does not match xsd enumeration restriction on token_enum_st warnings_.warn('Value "%(value)s" does not match xsd enumeration restriction on token_enum_st' % {"value" : value.encode("utf-8")} ) -tests/validate_simpletypes2_sup.py:1010: UserWarning: Value "22" does not match xsd maxInclusive restriction on integer_range_incl_st +tests/validate_simpletypes2_sup.py:1011: UserWarning: Value "22" does not match xsd maxInclusive restriction on integer_range_incl_st warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on integer_range_incl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1015: UserWarning: Value "-40" does not match xsd minExclusive restriction on integer_range_excl_st +tests/validate_simpletypes2_sup.py:1016: UserWarning: Value "-40" does not match xsd minExclusive restriction on integer_range_excl_st warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on integer_range_excl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1024: UserWarning: Value "mno pqr" does not match xsd minLength restriction on min_max_length_st +tests/validate_simpletypes2_sup.py:1025: UserWarning: Value "mno pqr" does not match xsd minLength restriction on min_max_length_st warnings_.warn('Value "%(value)s" does not match xsd minLength restriction on min_max_length_st' % {"value" : value.encode("utf-8")} ) -tests/validate_simpletypes2_sup.py:1029: UserWarning: Value "012345" does not match xsd length restriction on length_st +tests/validate_simpletypes2_sup.py:1030: UserWarning: Value "012345" does not match xsd length restriction on length_st warnings_.warn('Value "%(value)s" does not match xsd length restriction on length_st' % {"value" : value.encode("utf-8")} ) -tests/validate_simpletypes2_sup.py:1099: UserWarning: Value "0.2" does not match xsd minInclusive restriction on anonymous_float_valueType +tests/validate_simpletypes2_sup.py:1100: UserWarning: Value "0.2" does not match xsd minInclusive restriction on anonymous_float_valueType warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on anonymous_float_valueType' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:982: UserWarning: Value "9" does not match xsd maxExclusive restriction on integer_range_1_st +tests/validate_simpletypes2_sup.py:983: UserWarning: Value "9" does not match xsd maxExclusive restriction on integer_range_1_st warnings_.warn('Value "%(value)s" does not match xsd maxExclusive restriction on integer_range_1_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:990: UserWarning: Value "aaa1234mnopzzzbcd" does not match xsd pattern restrictions: [['^aaa.*zzz$', '^bbb.*xxx$'], ['^.*123.*$', '^.*456.*$']] +tests/validate_simpletypes2_sup.py:991: UserWarning: Value "aaa1234mnopzzzbcd" does not match xsd pattern restrictions: [['^aaa.*zzz$', '^bbb.*xxx$'], ['^.*123.*$', '^.*456.*$']] warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_pattern_st_patterns_, )) -tests/validate_simpletypes2_sup.py:1008: UserWarning: Value "-50" does not match xsd minInclusive restriction on integer_range_incl_st +tests/validate_simpletypes2_sup.py:1009: UserWarning: Value "-50" does not match xsd minInclusive restriction on integer_range_incl_st warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on integer_range_incl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1022: UserWarning: Value "asdf asdf asdf asdf asdf asdf" does not match xsd maxLength restriction on min_max_length_st +tests/validate_simpletypes2_sup.py:1023: UserWarning: Value "asdf asdf asdf asdf asdf asdf" does not match xsd maxLength restriction on min_max_length_st warnings_.warn('Value "%(value)s" does not match xsd maxLength restriction on min_max_length_st' % {"value" : value.encode("utf-8")} ) -tests/validate_simpletypes2_sup.py:1029: UserWarning: Value "01234567890" does not match xsd length restriction on length_st +tests/validate_simpletypes2_sup.py:1030: UserWarning: Value "01234567890" does not match xsd length restriction on length_st warnings_.warn('Value "%(value)s" does not match xsd length restriction on length_st' % {"value" : value.encode("utf-8")} ) -tests/validate_simpletypes2_sup.py:1039: UserWarning: Value "2015-05-01" does not match xsd minInclusive restriction on date_minincl_st +tests/validate_simpletypes2_sup.py:1040: UserWarning: Value "2015-05-01" does not match xsd minInclusive restriction on date_minincl_st warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on date_minincl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1044: UserWarning: Value "2015-11-01" does not match xsd maxInclusive restriction on date_maxincl_st +tests/validate_simpletypes2_sup.py:1045: UserWarning: Value "2015-11-01" does not match xsd maxInclusive restriction on date_maxincl_st warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on date_maxincl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1049: UserWarning: Value "2015-05-01" does not match xsd minExclusive restriction on date_minexcl_st +tests/validate_simpletypes2_sup.py:1050: UserWarning: Value "2015-05-01" does not match xsd minExclusive restriction on date_minexcl_st warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on date_minexcl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1054: UserWarning: Value "2015-11-01" does not match xsd maxExclusive restriction on date_maxexcl_st +tests/validate_simpletypes2_sup.py:1055: UserWarning: Value "2015-11-01" does not match xsd maxExclusive restriction on date_maxexcl_st warnings_.warn('Value "%(value)s" does not match xsd maxExclusive restriction on date_maxexcl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1059: UserWarning: Value "13:30:00" does not match xsd minInclusive restriction on time_minincl_st +tests/validate_simpletypes2_sup.py:1060: UserWarning: Value "13:30:00" does not match xsd minInclusive restriction on time_minincl_st warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on time_minincl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1064: UserWarning: Value "17:00:00" does not match xsd maxInclusive restriction on time_maxincl_st +tests/validate_simpletypes2_sup.py:1065: UserWarning: Value "17:00:00" does not match xsd maxInclusive restriction on time_maxincl_st warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on time_maxincl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1069: UserWarning: Value "13:30:00" does not match xsd minExclusive restriction on time_minexcl_st +tests/validate_simpletypes2_sup.py:1070: UserWarning: Value "13:30:00" does not match xsd minExclusive restriction on time_minexcl_st warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on time_minexcl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1074: UserWarning: Value "17:00:00" does not match xsd maxExclusive restriction on time_maxexcl_st +tests/validate_simpletypes2_sup.py:1075: UserWarning: Value "17:00:00" does not match xsd maxExclusive restriction on time_maxexcl_st warnings_.warn('Value "%(value)s" does not match xsd maxExclusive restriction on time_maxexcl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1079: UserWarning: Value "2015-06-01 13:20:10" does not match xsd minInclusive restriction on datetime_minincl_st +tests/validate_simpletypes2_sup.py:1080: UserWarning: Value "2015-06-01 13:20:10" does not match xsd minInclusive restriction on datetime_minincl_st warnings_.warn('Value "%(value)s" does not match xsd minInclusive restriction on datetime_minincl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1084: UserWarning: Value "2015-11-01 14:20:10" does not match xsd maxInclusive restriction on datetime_maxincl_st +tests/validate_simpletypes2_sup.py:1085: UserWarning: Value "2015-11-01 14:20:10" does not match xsd maxInclusive restriction on datetime_maxincl_st warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on datetime_maxincl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1089: UserWarning: Value "2015-06-01 13:20:10" does not match xsd minExclusive restriction on datetime_minexcl_st +tests/validate_simpletypes2_sup.py:1090: UserWarning: Value "2015-06-01 13:20:10" does not match xsd minExclusive restriction on datetime_minexcl_st warnings_.warn('Value "%(value)s" does not match xsd minExclusive restriction on datetime_minexcl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1094: UserWarning: Value "2015-11-01 14:20:10" does not match xsd maxExclusive restriction on datetime_maxexcl_st +tests/validate_simpletypes2_sup.py:1095: UserWarning: Value "2015-11-01 14:20:10" does not match xsd maxExclusive restriction on datetime_maxexcl_st warnings_.warn('Value "%(value)s" does not match xsd maxExclusive restriction on datetime_maxexcl_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:1101: UserWarning: Value "6.6" does not match xsd maxInclusive restriction on anonymous_float_valueType +tests/validate_simpletypes2_sup.py:1102: UserWarning: Value "6.6" does not match xsd maxInclusive restriction on anonymous_float_valueType warnings_.warn('Value "%(value)s" does not match xsd maxInclusive restriction on anonymous_float_valueType' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:987: UserWarning: Value "aaa12zzz" does not match xsd minLength restriction on pattern_st +tests/validate_simpletypes2_sup.py:988: UserWarning: Value "aaa12zzz" does not match xsd minLength restriction on pattern_st warnings_.warn('Value "%(value)s" does not match xsd minLength restriction on pattern_st' % {"value" : value} ) -tests/validate_simpletypes2_sup.py:990: UserWarning: Value "aaa12zzz" does not match xsd pattern restrictions: [['^aaa.*zzz$', '^bbb.*xxx$'], ['^.*123.*$', '^.*456.*$']] +tests/validate_simpletypes2_sup.py:991: UserWarning: Value "aaa12zzz" does not match xsd pattern restrictions: [['^aaa.*zzz$', '^bbb.*xxx$'], ['^.*123.*$', '^.*456.*$']] warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_pattern_st_patterns_, )) -tests/validate_simpletypes2_sup.py:1513: UserWarning: Value "pqrst" does not match xsd minLength restriction on simpleTwoElementTwoType +tests/validate_simpletypes2_sup.py:1514: UserWarning: Value "pqrst" does not match xsd minLength restriction on simpleTwoElementTwoType warnings_.warn('Value "%(value)s" does not match xsd minLength restriction on simpleTwoElementTwoType' % {"value" : value.encode("utf-8")} ) diff --git a/tests/validate_simpletypes2_sup.py b/tests/validate_simpletypes2_sup.py index bdfb38bff9b5ff6619df88bae8cce2c3536883ab..3659a7d16792534849d484f4d01d0e99283d58df 100644 --- a/tests/validate_simpletypes2_sup.py +++ b/tests/validate_simpletypes2_sup.py @@ -545,7 +545,8 @@ class MixedContainer: elif self.category == MixedContainer.CategorySimple: self.exportSimple(outfile, level, name) else: # category == MixedContainer.CategoryComplex - self.value.export(outfile, level, namespace, name, pretty_print) + self.value.export( + outfile, level, namespace, name, pretty_print=pretty_print) def exportSimple(self, outfile, level, name): if self.content_type == MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( diff --git a/tutorial/generateds_tutorial.html b/tutorial/generateds_tutorial.html index c670d2f5e26716e98e398dfbc909d218676a6ceb..6e3d4672303120f7d7240d1be64d5025fea08029 100644 --- a/tutorial/generateds_tutorial.html +++ b/tutorial/generateds_tutorial.html @@ -228,7 +228,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">October 05, 2016</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">October 13, 2016</td> </tr> </tbody> </table> @@ -1210,7 +1210,7 @@ named <tt class="docutils literal">garden_api.py</tt>, you can create an instanc <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateds_tutorial.txt">View document source</a>. -Generated on: 2016-10-05 22:04 UTC. +Generated on: 2016-10-13 22:29 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/tutorial/generateds_tutorial.zip b/tutorial/generateds_tutorial.zip index 0de1a5fda9d7ac479263d841bcba488ffbb32107..b43776a27c1672ffa3296d877d8bedfd5b46d742 100644 Binary files a/tutorial/generateds_tutorial.zip and b/tutorial/generateds_tutorial.zip differ