Commit Graph

36 Commits

Author SHA1 Message Date
Fred Drake 6dd7d07aa6 If PyXML is installed, there is no Node.allnodes, so that portion of
the test should be skipped if that's the case.
2002-09-12 17:03:02 +00:00
Fred Drake fd83374fe2 Remove duplicate checks of the Node.allnodes variable. 2002-07-25 20:40:28 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
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. :)
2002-07-23 19:04:11 +00:00
Fred Drake c441f7b3a6 Follow PyXML: Remove all prints from successful tests. This means we can
also drop the output file.
2002-07-19 22:16:41 +00:00
Martin v. Löwis 7d650ca83b Implement the encoding argument for toxml and toprettyxml.
Document toprettyxml.
2002-06-30 15:05:00 +00:00
Fred Drake 2998a55f2d Attribute nodes did not always get their ownerDocument and ownerElement
properly set.  This fixes that.
2001-12-06 18:27:48 +00:00
Fred Drake e50959a58e Fix appendChild() and insertBefore() (and replaceChild() indirectly) when
the node being added is a fragment node.
This closes SF bug #487929.
2001-12-06 04:32:18 +00:00
Guido van Rossum e2ae77b8b8 SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
Fred Drake 946f7b1b24 Update the xml.dom.minidom tests to cover the DOM-compliant parts of the
NodeList interface.
2001-09-28 20:31:50 +00:00
Martin v. Löwis 351c3d0554 Implement testGetElementsByTagNameNS. 2001-06-03 14:27:02 +00:00
Tim Peters 0009c4ea59 Whitespace normalization. 2001-02-21 07:29:48 +00:00
Andrew M. Kuchling bc8f72cccc Patch #103854: raises an exception if a non-Attr node is passed to
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.)
2001-02-21 01:30:26 +00:00
Martin v. Löwis fe28ca09a5 Add xml declaration into toxml testcase. 2001-02-06 01:16:48 +00:00
Fred Drake acfb3f6006 Revise the driver code to be more informative in the final report. 2001-02-01 18:11:29 +00:00
Martin v. Löwis 2bcb32372c Except HierarchyRequestErr instead of TypeError. 2001-01-27 09:17:55 +00:00
Fredrik Lundh f785042433 a bold attempt to fix things broken by MAL's verify patch: import
'verify' iff it's used by a test module...
2001-01-17 21:51:36 +00:00
Marc-André Lemburg 3661908a6a This patch removes all uses of "assert" in the regression test suite
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.
2001-01-17 19:11:13 +00:00
Andrew M. Kuchling 6d0cee1170 Add forgotten import 2001-01-02 20:56:42 +00:00
Andrew M. Kuchling ad4a558af8 Added test case for legal DOM children 2000-12-31 04:03:27 +00:00
Fred Drake 1703cf662c Before calling traceback.print_exc(), call sys.stdout.flush(). This makes
it much easier to see where things went wrong.
2000-12-15 21:31:59 +00:00
Fred Drake 3277da0f33 Update the test suite to cover more ground.
This closes patch #102477.
2000-12-14 18:20:22 +00:00
Fred Drake a1bde802f1 testInsertBefore(): Rewritten to actually test insertBefore() somewhat.
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().
2000-11-21 22:02:43 +00:00
Fred Drake 004d5e6880 Make reindent.py happy (convert everything to 4-space indents!). 2000-10-23 17:22:08 +00:00
Lars Gustäbel 5bad5a4be2 Updated test suite to latest pulldom changes. 2000-10-13 20:54:10 +00:00
Jeremy Hylton 3b0c600394 cosmetic changes only:
use standard Python style for whitespace near = and ()
2000-10-12 17:31:36 +00:00
Lars Gustäbel f27f5ab31f Added additional test cases for pulldom modifications. 2000-10-11 22:36:00 +00:00
Fred Drake ebe73025cd Move the test for confirmation that all nodes have been freed into the
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.
2000-10-09 19:57:39 +00:00
Martin v. Löwis 0a84a338f9 Add .toxml test case, as proposed by Alex Martelli in bug report #116244. 2000-10-06 22:42:55 +00:00
Barry Warsaw c79dff679f Added an "import xml.parsers.expat" to turn errors due to not having
the parser built into ImportErrors.
2000-09-26 18:00:20 +00:00
Guido van Rossum c77593d31a Get rid of the one tab in the file.
Closes Bug #115054.
2000-09-22 09:23:08 +00:00
Guido van Rossum 9e79a25b8a The minidom.Node class has a debug attribute which, when its _debug
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.)
2000-09-21 20:10:39 +00:00
Paul Prescod 4c799191a2 Fix test errors. 2000-09-19 19:33:02 +00:00
Martin v. Löwis 89c528b02d Don't print specific Node instances unless running verbosely.
Closes Bug #114775.
2000-09-19 16:22:10 +00:00
Paul Prescod 10d27660c9 Change assertions to confirmations so that optimization doesn't disable
checks.
2000-09-18 19:07:26 +00:00
Fred Drake 17647f5201 Compute the name of the test file so that it can be found both when this
test is run as a script and when imported via the regression test
framework.

Problem reported by Phillip Porch <root@theporch.com>.
2000-07-03 16:37:42 +00:00
Paul Prescod 7993bcc040 Added minidom tests. 2000-07-01 14:54:16 +00:00