[plt-scheme] testing a module

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Mar 30 13:50:09 EST 2005

At Wed, 30 Mar 2005 09:46:48 +1000, Chris Wright wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> what is the most sensible way to include tests in a module?
> python uses an idiom where
> if __name__ == '__main__':
>     do_the_tests()
> is placed at the end of a module, and then the module can be called with
>  > python <module-name>
> and do_the_tests() will be executed.
> What's the most sensible way to do this in drscheme? I would expect the 
> test code to be executed when I "ran" the module in the IDE.

Typically, I just put an unexported function at the bottom of the
module and then call it from the REPL, after executing the module.


Posted on the users mailing list.