summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11068)Victor Stinner2018-12-101-3/+54
| | | | | | | | | | | | Fix xml.dom.minidom cloneNode() on a document with an entity: pass the correct arguments to the user data handler of an entity (fix an old copy/paste mistake). Bug spotted and fix proposed by Charalampos Stratakis, initial reproducer written by Petr Viktorin. Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com> Co-Authored-By: Petr Viktorin <encukou@gmail.com> (cherry picked from commit 8e0418688906206fe59bd26344320c0fc026849e)
* Issue #10131: Fixed deep copying of minidom documents. Based on patchSerhiy Storchaka2015-11-261-44/+53
| | | | by Marian Ganisin.
* Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-37/+38
|
* Issue #19683: Removed empty tests from test_minidom.Zachary Ware2013-12-191-69/+0
| | | | Initial patch by Ajitesh Gupta.
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-1/+1
| | | | Patch by Serhiy Storchaka.
* #4147: minidom's toprettyxml no longer adds whitespace around a text node ↵Ezio Melotti2011-11-181-5/+32
| | | | when it is the only child of an element. Initial patch by Dan Kenigsberg.
* Fix typo and case in a recently added testÉric Araujo2011-10-051-1/+1
|
* #4147: minidom's toprettyxml no longer adds whitespace to text nodes.R David Murray2011-10-011-0/+7
| | | | Patch by Dan Kenigsberg.
* Issue 11164: Remove obsolete allnodes test from minidom test.Martin v. Löwis2011-05-091-20/+0
| | | | Patch by Arfrever Frehtes Taifersar Arahesis.
* Merged revisions 85546-85547 via svnmerge fromGeorg Brandl2010-11-261-0/+7
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85546 | georg.brandl | 2010-10-15 19:58:45 +0200 (Fr, 15 Okt 2010) | 1 line #5762: fix handling of empty namespace in minidom, which would result in AttributeError on toxml(). ........ r85547 | georg.brandl | 2010-10-15 20:00:35 +0200 (Fr, 15 Okt 2010) | 1 line #6098: Refrain from claiming DOM level 3 conformance in minidom. ........
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-3/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Merged revisions 83152 via svnmerge fromAndrew M. Kuchling2010-07-251-0/+8
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83152 | andrew.kuchling | 2010-07-25 19:38:47 -0400 (Sun, 25 Jul 2010) | 1 line #777884: make .normalize() do nothing for childless nodes, instead of raising an exception ........
* Various tests cleanup: check_warnings/check_py3k_warnings, unittest.assert* ↵Florent Xicluna2010-03-191-1/+1
| | | | and setUp/tearDown.
* Use "x in y" instead of y.find(x) != -1.Ezio Melotti2010-03-171-1/+1
|
* Do not chdir when running test_xml_etree, and enhance the findfile helper.Florent Xicluna2010-03-131-9/+3
|
* Move the xml test data to their own directory.Florent Xicluna2010-03-131-1/+1
|
* Fix more unbound locals in code paths that do not seem to be used.Georg Brandl2010-02-061-1/+2
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-1/+1
|
* Issue #2170: refactored xml.dom.minidom.normalize, increasing bothR. David Murray2009-04-091-0/+161
| | | | its clarity and its speed.
* fix incorrect auto-translation of TestSkipped -> unittest.SkipTestBenjamin Peterson2009-03-261-1/+1
|
* remove test_support.TestSkipped and just use unittest.SkipTestBenjamin Peterson2009-03-261-1/+1
|
* Issue #1390: Raise ValueError in toxml when an invalid comment wouldMartin v. Löwis2008-05-231-0/+5
| | | | otherwise be produced.
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* #1433694: minidom's .normalize() failed to set .nextSibling for last element.Andrew M. Kuchling2008-02-231-0/+8
| | | | Fix by Malte Helmert
* Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz2007-04-251-159/+159
| | | | You might want to review this change as it's my first time. Be gentle. :-)
* Consolidate patches #1690164, 1683397, and 1690169, all of which refactor ↵Collin Winter2007-03-281-1342/+1259
| | | | | | XML-related test suites. The patches are applied together because they use a common output/xmltests file. Thanks to Jerry Seutter for all three patches.
* expunge the xmlcore changes:Fred Drake2006-07-291-47/+45
| | | | | | | | | | | | | | | | | | | 41667, 41668 - initial switch to xmlcore 47044 - mention of xmlcore in What's New 50687 - mention of xmlcore in the library reference re-apply xmlcore changes to xml: 41674 - line ending changes (re-applied manually), directory props 41677 - add cElementTree wrapper 41678 - PSF licensing for etree 41812 - whitespace normalization 42724 - fix svn:eol-style settings 43681, 43682 - remove Python version-compatibility cruft from minidom 46773 - fix encoding of \r\n\t in attr values in saxutils 47269 - added XMLParser alias for cElementTree compatibility additional tests were added in Lib/test/test_sax.py that failed with the xmlcore changes; these relate to SF bugs #1511497, #1513611
* Whitespace normalization.Tim Peters2005-12-251-3/+3
|
* move the xml package implementation to xmlcore, and adjust the tests toFred Drake2005-12-141-45/+47
| | | | | test that package, not the xmlcore/PyXML switcheroo fiasco in the xml module/package
* [Patch #1094164] replaceChild(x,x) ends up removing x of the tree. Add fix ↵Andrew M. Kuchling2005-11-221-0/+11
| | | | from Felix Rabe and a test case
* Patch #1309009, Fix segfault in pyexpat when the XML document isNeal Norwitz2005-09-301-0/+9
| | | | | | in latin_1, but Python incorrectly assumes it is in UTF-8 format Will backport.
* bug [ 1262320 ] minidom.py alternate newl support is brokenGeorg Brandl2005-08-251-4/+11
|
* Fix all wrong instances of "it's".Georg Brandl2005-07-221-3/+3
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-1/+1
| | | | From SF patch #852334.
* Synchronize with PyXML's 1.33: Import missing modules.Martin v. Löwis2003-01-251-3/+6
|
* Merge PyXML 1.11-1.26:Martin v. Löwis2003-01-251-24/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-arrange the imports into "Python normal form." Add test of the getUserData() / setUserData() methods, including the NODE_CLONED callback. Added support for renameNode() and getInterface(). Changed Node.unlink() so an unlinked node is not rendered completely unusable by setting childNodes to None. Element.removeAttributeNode() is slightly less destructive. Added test for the wholeText attribute. Added a test for Text.replaceWholeText(). Fixed to properly create Element in test of user data Rename a local variable so it makes sense when viewed as a sequence. Unlink a few documents when we're done with them. Added tests to define the behavior of the cloneNode() and importNode() mehods, especially in the "difficult" cases of document and document-type nodes. Filled in a few more of the other cloneNode() tests. NodeList.item() does not exist before Python 2.2, since it requires being able to create subtypes of list. Use the subscript syntax instead. Added a test that minidom documents can be pickled and unpickled. Closes SF bug #609641. Fill in an empty test, making sure we get the whitespace right for the data attribute of a processing instruction. Added checks for a few more invariants for processing instructions. testProcessingInstruction(): The length attribute of the NodeList interface is not implemented for Python 2.0, 2.1, so only use len() to test the length. testSchemaType(): New test, testing just the minimum of schemaType support; this is different from the test_xmlbuilder version of the test since it doesn't rely on using a specific builder, and the builders support different levels of DTD support. Add tests for the removeNamedItem() and removeNamedItemNS() methods of the NamedNodeMap instances found on Element nodes. These do not pass; the fix will be committed shortly. Added support for the DOM Level 3 (draft) Element.setIdAttribute*() methods. Do more to avoid creating new Attr nodes, so that attributes do not lose their ID-ness when set using setIdAttribute*().
* If PyXML is installed, there is no Node.allnodes, so that portion ofFred Drake2002-09-121-11/+22
| | | | the test should be skipped if that's the case.
* Remove duplicate checks of the Node.allnodes variable.Fred Drake2002-07-251-3/+0
|
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Follow PyXML: Remove all prints from successful tests. This means we canFred Drake2002-07-191-21/+14
| | | | also drop the output file.
* Implement the encoding argument for toxml and toprettyxml.Martin v. Löwis2002-06-301-0/+8
| | | | Document toprettyxml.
* Attribute nodes did not always get their ownerDocument and ownerElementFred Drake2001-12-061-0/+22
| | | | properly set. This fixes that.
* Fix appendChild() and insertBefore() (and replaceChild() indirectly) whenFred Drake2001-12-061-0/+45
| | | | | the node being added is a fragment node. This closes SF bug #487929.
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-2/+2
|
* Update the xml.dom.minidom tests to cover the DOM-compliant parts of theFred Drake2001-09-281-2/+28
| | | | NodeList interface.
* Implement testGetElementsByTagNameNS.Martin v. Löwis2001-06-031-1/+8
|
* Whitespace normalization.Tim Peters2001-02-211-1/+1
|
* Patch #103854: raises an exception if a non-Attr node is passed toAndrew M. Kuchling2001-02-211-0/+11
| | | | | | NamedNodeMap.setNamedItem(). Martin, should I sync the PyXML tree, too, or do you want to do it? (I don't know if you're wrapping the 0.6.4 release right now.)
* Add xml declaration into toxml testcase.Martin v. Löwis2001-02-061-1/+1
|
* Revise the driver code to be more informative in the final report.Fred Drake2001-02-011-7/+10
|