[Kss-devel] Improved way of testing command sets

Jeroen Vloothuis jeroen.vloothuis at xs4all.nl
Tue Jul 10 16:08:47 CEST 2007


For the pure Python version of the KSS server side libraries I created a 
small extension to help with testing.

It basically is just a small piece of code to create a string 
representation of a command set. You can then test them really easy with 
a doctest.

Example of a test:

   >>> scriptaculous.effect(CSS('node'), 'fade')
   >>> print commands
   effect(css('node'), type='fade')

   >>> scriptaculous.effect(CSS('node'), 'fade', delay=0.1)
   >>> print commands
   effect(css('node'), type='fade')
   effect(css('node'), delay='0.1', type='fade')



More information about the Kss-devel mailing list