gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz] Jython tests


From: Tuomas Lukka
Subject: Re: [Gzz] Jython tests
Date: Sat, 18 May 2002 17:55:33 +0300
User-agent: Mutt/1.3.25i

On Sat, May 18, 2002 at 04:10:27PM +0200, B. Fallenstein wrote:
> Tuomas Lukka wrote:
> >Benja: the idea of writing our unit tests in Python is just BRILLIANT.
> >The tests, when written in Java, are far too clumsy and unclear.
> 
> :-)
> 
> vegai likes PyUnit, which is modeled after JUnit. We could also think 
> about subclassing JUnit's classes in Jython. However, I don't like 
> having to use Python's 'self' in the tests-- i.e., for a variable 'c' 
> initialized in setUp(), I'd have to write 'self.c' (due to Python 2.1's 
> missing namespaces). This needs some playing around, I guess...

I think I'd prefer just making test scripts like Perl's... They're
a good example of how to make tests simple using character streams.

Each test prints out lines of the form

13
ok 5
not ok 6

where the first number is the number of test cases to expect, then the
next numbers are in a sequence. All other output is ignored (can be used
for debugging).


        Tuomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]