From: Kent J. <ke...@td...> - 2005-10-31 13:04:08
|
Graham Klyne wrote: > While I'm on this topic, does anyone know of any attempts to port Java's > XMLunit (http://xmlunit.sourceforge.net/) to Python/Jython? XMLUnit is usable from Jython as-is. It is a Java library so it can be imported directly. On the other hand it relies on Java introspection to discover test cases which is problematic in Jython. Fortunately, the actuall XMLUnit assertions are static methods of the XMLAssert class. The Diff and DetailedDiff classes are also usable standalone. I use XMLUnit extensively from Jython. My test cases subclass unittest.TestCase (not a JUnit or XMLUnit class) so test discovery works as expected. Then I make use of static methods of XMLUnit to implement the actual tests. Kent -- http://www.kentsjohnson.com |