summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Except HierarchyRequestErr instead of TypeError.Martin v. Löwis2001-01-271-1/+1
|
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-4/+4
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Add forgotten importAndrew M. Kuchling2001-01-021-0/+1
|
* Added test case for legal DOM childrenAndrew M. Kuchling2000-12-311-1/+25
|
* Before calling traceback.print_exc(), call sys.stdout.flush(). This makesFred Drake2000-12-151-0/+1
| | | | it much easier to see where things went wrong.
* Update the test suite to cover more ground.Fred Drake2000-12-141-0/+8
| | | | This closes patch #102477.
* testInsertBefore(): Rewritten to actually test insertBefore() somewhat.Fred Drake2000-11-211-14/+103
| | | | | | | | | | | | | | | | | | | | testAAA(), testAAB(): Added checks that the results are right. testTooManyDocumentElements(): Added code to actually test this. testCloneElementDeep() testCloneElementShallow(): Filled these in with test code. _testCloneElementCopiesAttributes(), _setupCloneElement(): Helper functions used with the other testCloneElement*() functions. testCloneElementShallowCopiesAttributes(): No longer a separate test; _setupCloneElement() uses _testCloneElementCopiesAttributes() to test that this is always done. testNormalize(): Added to check Node.normalize().
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-13/+13
|
* Updated test suite to latest pulldom changes.Lars Gustäbel2000-10-131-15/+15
|
* cosmetic changes only:Jeremy Hylton2000-10-121-118/+118
| | | | use standard Python style for whitespace near = and ()
* Added additional test cases for pulldom modifications.Lars Gustäbel2000-10-111-1/+67
|
* Move the test for confirmation that all nodes have been freed into theFred Drake2000-10-091-24/+5
| | | | | | driver code, so that each test gets this; it had been done inconsistently. Remove the lines that set the variables holding dom objects to None; not needed since the interpreter cleans up locals on function return.
* Add .toxml test case, as proposed by Alex Martelli in bug report #116244.Martin v. Löwis2000-10-061-1/+6
|
* Added an "import xml.parsers.expat" to turn errors due to not havingBarry Warsaw2000-09-261-0/+1
| | | | the parser built into ImportErrors.
* Get rid of the one tab in the file.Guido van Rossum2000-09-221-1/+1
| | | | Closes Bug #115054.
* The minidom.Node class has a debug attribute which, when its _debugGuido van Rossum2000-09-211-0/+2
| | | | | | | | | | flag is true, is set to a StringIO object that silently collects all debug messages. This is triggered by the Node._debug=1 statement at the top of test_minidom.py. After the tests, we better delete that StringIO object to avoid wasting memory. We also reset the _debug flag. (Note that this is an undetectable memory leak, and the memory doesn't get collected by the cycle-gc either, because it's all reachable -- it's just useless.)
* Fix test errors.Paul Prescod2000-09-191-0/+1
|
* Don't print specific Node instances unless running verbosely.Martin v. Löwis2000-09-191-2/+8
| | | | Closes Bug #114775.
* Change assertions to confirmations so that optimization doesn't disablePaul Prescod2000-09-181-46/+66
| | | | checks.
* Compute the name of the test file so that it can be found both when thisFred Drake2000-07-031-2/+12
| | | | | | | test is run as a script and when imported via the regression test framework. Problem reported by Phillip Porch <root@theporch.com>.