summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element ↵Antoine Pitrou2012-10-041-2/+42
| | | | element_factory (fixes a regression in SimpleTAL).
* #15970: merge with 3.2.Ezio Melotti2012-09-191-0/+12
|\
| * #15970: xml.etree.ElementTree now serializes correctly the empty HTML ↵Ezio Melotti2012-09-191-0/+20
| | | | | | | | elements "meta" and "param".
* | Preserve the invariant tostring(elem) == b''.join(tostringlist(elem)) and ↵Eli Bendersky2012-07-171-0/+9
| | | | | | | | add a test to make sure it keeps working
* | Close #1767933: Badly formed XML using etree and utf-16. Patch by Serhiy ↵Eli Bendersky2012-07-151-65/+175
| | | | | | | | Storchaka, with some minor fixes by me
* | Make the test more resilient to test-run order (closes #15075)Eli Bendersky2012-06-161-8/+20
| |
* | Skip XincludeTest entirely instead of just ignoring failures, because it may ↵Eli Bendersky2012-06-151-1/+1
| | | | | | | | segfault, depending on the order of running tests
* | Removed _SimpleElementPath and its flaky test. The test monkey-patches the ↵Eli Bendersky2012-06-151-23/+0
| | | | | | | | module, which causes other failures and fails itself depending on the order tests are run.
* | mark problematic test as expected failure - investigatingEli Bendersky2012-06-151-2/+6
| |
* | Replace the iter/itertext methods of Element in _elementtree with true C ↵Eli Bendersky2012-06-151-108/+139
| | | | | | | | | | | | implementations, instead of the bootstrapped Python code. In addition to being cleaner (removing the last remains of the bootstrapping code in _elementtree), this gives a 10x performance boost for iter() on large documents. Also reorganized the tests a bit to be more robust.
* | Issue #14007: implement doctype() method calling in XMLParser of _elementtree.Eli Bendersky2012-06-011-1/+18
| | | | | | | | Includes exposing a doctype handler from expat through pyexpat.
* | Issue #14007: make XMLParser a real subclassable type exported from ↵Eli Bendersky2012-06-011-0/+29
| | | | | | | | _elementtree. +cleanups
* | Issue #14007: implemented the 'element_factory' feature of TreeBuilder inEli Bendersky2012-05-301-4/+14
| | | | | | | | _elementtree, with a test.
* | Issue #14007: make TreeBuilder an actual type exposed from _elementtree, and ↵Eli Bendersky2012-05-291-0/+14
| | | | | | | | subclassable.
* | Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.Eli Bendersky2012-05-291-1/+65
| | | | | | | | | | Add attrib keyword to Element and SubElement in _elementtree. Patch developed with Ezio Melotti.
* | Issue #14849: setup Element data members to be assignable in subclassesEli Bendersky2012-05-201-0/+4
| |
* | Fixes and enhancements to _elementtree:Eli Bendersky2012-04-031-0/+35
| | | | | | | | | | | | * Fixed refleak problems when GC collection is run (see messages in issue #14065) * Added weakref support to Element objects
* | Removing the test of Element that causes ref-leak in GC (issue #14464).Eli Bendersky2012-04-011-10/+0
| | | | | | | | | | | | | | | | I will now continue investigating the cause of the ref-leak, but I wanted to remove the test so that the refcount test in the buildbots could be clean. The whole change (adding GC to Element) is not reverted because it improved the situation (GC works for immediate cycles) and didn't cause regressions (the test is new and was added together with the fix).
* | Fix the tests of GC collection in ET.Element according to Benjamin's ↵Eli Bendersky2012-03-311-23/+21
| | | | | | | | recommendations
* | Issue #14065: Added cyclic GC support to ET.ElementEli Bendersky2012-03-301-1/+26
| |
* | Issue #13782: streamline argument type-checking in ET.ElementEli Bendersky2012-03-231-3/+9
| | | | | | | | | | | | | | | | append, extend and insert now consistently type-check their argument in both the C and Python implementations, and raise TypeError for non-Element argument. Added tests
* | fix trailing whitespaceEli Bendersky2012-03-161-1/+1
| |
* | Add a test that makes sure TreeBuilder can be passed element_factory in theEli Bendersky2012-03-161-0/+5
| | | | | | | | | | constructor. Marked as expectedFailure since it currently fails for the C implementation.
* | Issue #14207: the ParseError exception raised by _elementtree was madeEli Bendersky2012-03-161-20/+22
| | | | | | | | | | | | | | | | | | | | consistent to the one raised by the Python module (the 'code' attribute was added). In addition, the exception is now documented. Added a test to check that ParseError has the required attributes, and threw away the equivalent doctest which is no longer required.
* | Closes Issue #14246: _elementtree parser will now handle io.StringIOEli Bendersky2012-03-161-0/+14
| |
* | Issue #14178: Problem deleting slices with steps != +1 in the _elementtree ↵Eli Bendersky2012-03-091-5/+86
| | | | | | | | | | | | module. Fixed the problem and added some tests. Closes #14178
* | Issue #14007: accept incomplete TreeBuilder objects (missing ↵Florent Xicluna2012-03-051-46/+103
| | | | | | | | start/end/data/close) for the Python implementation as well. Add disabled tests for the doctype() method.
* | Issue #14128: Exposing Element as an actual type from _elementtree, rather ↵Eli Bendersky2012-03-041-2/+37
| | | | | | | | | | | | | | | | than a factory function. This makes the C implementation more aligned with the Python implementation. Also added some tests to ensure that Element is now a type and that it can be subclassed.
* | fix the _namespace_map cleanup for cElementTree tests.Florent Xicluna2012-02-161-6/+1
| |
* | The C accelerator was not always imported for cElementTree's tests. (there's ↵Florent Xicluna2012-02-161-1/+0
| | | | | | | | still an issue with --huntrleaks switch)
* | make TestAccelerator[Not]Imported for ElementTree more robustEli Bendersky2012-02-161-3/+1
| |
* | in the tests of ElementTree, verify that the C accelerator is imported or ↵Eli Bendersky2012-02-161-0/+10
| | | | | | | | not imported as expected
* | Issue #13988: cElementTree is deprecated and the _elementtree accelerator is ↵Florent Xicluna2012-02-131-23/+26
| | | | | | | | automatically used whenever available.
* | Merge 3.2: issue #2892Florent Xicluna2011-11-011-0/+1
|\ \ | |/
| * Closes #2892: preserve iterparse events in case of SyntaxError.Florent Xicluna2011-11-011-0/+1
| |
* | PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.Antoine Pitrou2011-10-121-4/+4
| |
* | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-3/+3
|/ | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
* #10777: fix iteration over dict keys while mutating the dict.Georg Brandl2010-12-281-0/+9
|
* Fix Issue10205 - XML QName error when different tags have same QName.Senthil Kumaran2010-11-091-0/+5
|
* #2830: add html.escape() helper and move cgi.escape() uses in the standard ↵Georg Brandl2010-10-151-2/+2
| | | | library to it. It defaults to quote=True and also escapes single quotes, which makes casual use safer. The cgi.escape() interface is not touched, but emits a (silent) PendingDeprecationWarning.
* Explicitly close some files (from issue #10093)Antoine Pitrou2010-10-141-7/+16
|
* #9964: fix running test_xml_etree under -OO.Georg Brandl2010-10-141-0/+4
|
* Fix xml.etree.ElementInclude to include the tail of the current node. Issue ↵Florent Xicluna2010-08-081-0/+18
| | | | #6231
* Fix BytesWarning in test_xml_etree, introduced with r83851.Florent Xicluna2010-08-081-2/+2
|
* Issue #8047: Fix the xml.etree serializer to return bytes by default.Florent Xicluna2010-08-081-23/+23
| | | | Use ``encoding="unicode"`` to generate a Unicode string.
* Issue #9425: skip tests if a filename is not encodableVictor Stinner2010-08-071-0/+5
|
* (partially)Florent Xicluna2010-04-021-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Merged revisions 79534,79537,79539,79558,79606 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79534 | florent.xicluna | 2010-03-31 23:21:54 +0200 (mer, 31 mar 2010) | 2 lines Fix test for xml.etree when using a non-ascii path. And use check_warnings instead of catch_warnings. ........ r79537 | florent.xicluna | 2010-03-31 23:40:32 +0200 (mer, 31 mar 2010) | 2 lines Fix typo ........ r79539 | florent.xicluna | 2010-04-01 00:01:03 +0200 (jeu, 01 avr 2010) | 2 lines Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests. ........ r79558 | florent.xicluna | 2010-04-01 20:17:09 +0200 (jeu, 01 avr 2010) | 2 lines #7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote. ........ r79606 | florent.xicluna | 2010-04-02 19:26:42 +0200 (ven, 02 avr 2010) | 2 lines Backport some robotparser test and skip the test if the external resource is not available. ........
* Merged revisions ↵Benjamin Peterson2010-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 78966,78970,79018,79026-79027,79055,79156,79159,79163-79164,79173,79176,79194,79208,79212 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78966 | florent.xicluna | 2010-03-14 10:20:59 -0500 (Sun, 14 Mar 2010) | 2 lines Do not hardcode Expat version. It's possible to build Python with --with-system-expat option. ........ r78970 | benjamin.peterson | 2010-03-14 21:58:24 -0500 (Sun, 14 Mar 2010) | 1 line this little exception dance is pointless ........ r79018 | collin.winter | 2010-03-16 22:04:01 -0500 (Tue, 16 Mar 2010) | 1 line Delete unused import. ........ r79026 | vinay.sajip | 2010-03-17 10:05:57 -0500 (Wed, 17 Mar 2010) | 1 line Issue #8162: logging: Clarified docstring and documentation for disable function. ........ r79027 | collin.winter | 2010-03-17 12:36:16 -0500 (Wed, 17 Mar 2010) | 1 line Avoid hardcoding refcounts in tests. ........ r79055 | benjamin.peterson | 2010-03-18 16:30:48 -0500 (Thu, 18 Mar 2010) | 1 line remove installation of deleted test/output dir ........ r79156 | florent.xicluna | 2010-03-20 17:21:02 -0500 (Sat, 20 Mar 2010) | 2 lines Cleanup test_struct using check_warnings. ........ r79159 | florent.xicluna | 2010-03-20 17:26:42 -0500 (Sat, 20 Mar 2010) | 2 lines Cleanup test_tarfile, and use check_warnings. ........ r79163 | michael.foord | 2010-03-20 19:53:39 -0500 (Sat, 20 Mar 2010) | 1 line A faulty load_tests in a test module no longer halts test discovery. A placeholder test, that reports the failure, is created instead. ........ r79164 | michael.foord | 2010-03-20 19:55:58 -0500 (Sat, 20 Mar 2010) | 1 line Change order of arguments in a unittest function. ........ r79173 | georg.brandl | 2010-03-21 04:09:38 -0500 (Sun, 21 Mar 2010) | 1 line Document that GzipFile supports iteration. ........ r79176 | georg.brandl | 2010-03-21 04:17:41 -0500 (Sun, 21 Mar 2010) | 1 line Introduce copy by slicing, used in later chapters. ........ r79194 | florent.xicluna | 2010-03-21 06:58:11 -0500 (Sun, 21 Mar 2010) | 2 lines Use assertRaises and add a specific warning filter. ........ r79208 | andrew.kuchling | 2010-03-21 13:47:12 -0500 (Sun, 21 Mar 2010) | 1 line Add items ........ r79212 | georg.brandl | 2010-03-21 14:01:38 -0500 (Sun, 21 Mar 2010) | 1 line Fix plural. ........
* Merged revisions 78838-78839,78917,78919,78934,78937 via svnmerge fromFlorent Xicluna2010-03-131-69/+1542
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78838 | florent.xicluna | 2010-03-11 15:36:19 +0100 (jeu, 11 mar 2010) | 2 lines Issue #6472: The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too. ........ r78839 | florent.xicluna | 2010-03-11 16:55:11 +0100 (jeu, 11 mar 2010) | 2 lines Fix repr of tree Element on windows. ........ r78917 | florent.xicluna | 2010-03-13 12:18:49 +0100 (sam, 13 mar 2010) | 2 lines Move the xml test data to their own directory. ........ r78919 | florent.xicluna | 2010-03-13 13:41:48 +0100 (sam, 13 mar 2010) | 2 lines Do not chdir when running test_xml_etree, and enhance the findfile helper. ........ r78934 | florent.xicluna | 2010-03-13 18:56:19 +0100 (sam, 13 mar 2010) | 2 lines Update some parts of the xml.etree documentation. ........ r78937 | florent.xicluna | 2010-03-13 21:30:15 +0100 (sam, 13 mar 2010) | 3 lines Add the keyword argument "method=None" to the .write() method and the tostring/tostringlist functions. Update the function, class and method signatures, according to the new convention. ........
* Merged revisions 78125 via svnmerge fromAntoine Pitrou2010-02-091-0/+20
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78125 | antoine.pitrou | 2010-02-09 18:08:05 +0100 (mar., 09 févr. 2010) | 7 lines Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in XML processing instructions and comments. These raw characters are allowed by the XML specification, and are necessary when outputting e.g. PHP code in a processing instruction. Patch by Neil Muller. ........