ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: PyUnit integ ?
Date Mon, 02 Dec 2002 23:53:18 GMT
That's not what I said... I wasn't talking of generating Java sources from
Python unit tests, but writing Java wrappers to these Jython classes.

Assuming a Jython unit test is similar in nature to a Java JUnit test (test
methods), you can write a Java wrapper with a single test method which calls
a given Jython method from a given class. Wrap all Jython test method in
such wrapper instances (that's what JUnit is doing itself in a nutshell),
then collate them into a test suite, and voilĂ ! You have a pure JUnit test
suite that delegates to Jython code for the actual processing... something
<junit> can understand easily.

The devil's in the details, but from 30,000 ft, it's doable. --DD

-----Original Message-----
From: Sebastien BLANC [mailto:Sebastien.Blanc@alcatel.com] 
Sent: Monday, December 02, 2002 4:47 PM
To: Ant Developers List
Subject: Re: PyUnit integ ?

> But instead of extending Ant, maybe you should extend JUnit instead!?!?!?
It
> would be as simple as writing a class with a public static Test suite()
> method that gathered all the PyUnit test classes, and would execute them
> using Jython for example thru wrapper classes. If you do that in a good
> JUnit way, firing the proper JUnit events, then the integration with Ant
is
> already done, and is called <junit> ;-)

I already tried that and this is too limitating. the java code generated
from
jython scripts does not enable overload and raises few issues. in fact junit
does not recommand at all to work this way to integrate jython tests into
junit.
kinda guess that's why PyUnit was created. I'll write a task for PyUnit and
will
propose for ANT integration.

seb.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message