[Twisted-Python] Re: [Twisted-commits] r10512 - test to make sure xmlns= bug doesn't pop up again

Andrew Bennetts andrew-twisted at puzzling.org
Sat Apr 10 02:56:16 EDT 2004

On Fri, Apr 09, 2004 at 01:27:37PM -0600, Jonathan Simms wrote:
> Author: slyphon
> Date: Fri Apr  9 13:27:37 2004
> New Revision: 10512
> Modified:
>    trunk/twisted/test/test_xml.py
> Log:
> test to make sure xmlns= bug doesn't pop up again
> Modified: trunk/twisted/test/test_xml.py
> ==============================================================================
> --- trunk/twisted/test/test_xml.py	(original)
> +++ trunk/twisted/test/test_xml.py	Fri Apr  9 13:27:37 2004
> @@ -447,8 +447,13 @@
>              if result:
>                  self.assert_(hasattr(result[0], 'tagName'))
> +    def testParseXMLStringWithUnicode(self):
> +        # this is a regression test. dash fixed something to do with xmlns=
> +        # and this tests to make sure that a particular case works
[snip massive heap of xml]
> +
> +        node = microdom.parseString(str)

Tests like this help me appreciaate why Jim Fulton likes doctest so much.

What the hell is this actually testing?  Which "particular case" in that XML
is the relevant one?  I'm rather skeptical that that is a minimal test case,
and it certainly isn't a readable one. The only hints given are that it
somehow involves parsing, unicode, and xmlns, which isn't very specific.
I'm also a little skeptical that the bug and its fix have been properly
understood, if no-one has taken the time to figure out a simple way to
demonstrate it.

Tests are code too, and should be comprehensible and maintainable like any
other code.

I don't mind this sort of thing as an interim measure, but there wasn't even
a single FIXME in this test to suggest that there was anything wrong with


More information about the Twisted-Python mailing list