[racket] Rackunit best practices

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Aug 23 09:33:37 EDT 2013

One more point: we are in the process of re-arrange the code
base so that it uses the package system just like any outside 
contributor does. We already run every git-push thru a complete
test engine called drdr, and all contributed packages may opt 
into this mechanism (so that any change will test the whole 
code base). So if you're thinking of package contributors, 
keep this in mind -- Matthias

On Aug 23, 2013, at 2:09 AM, Chad Albers wrote:

> Thanks everyone for their feedback.  Keep it coming!  I didn't know
> about the ability to include tests next to the source code a la
> literate-programming.  A fantastic feature.  I'll try it out
> personally.  I am, though, concerned that my tests will obscure the
> code that executes it.
> From the many responses, it looks like Dr Racket is more popular than
> I thought.  I'm a long-time Emacs user, and although I have tried Dr
> Racket, Emacs is now part of my bones.  (I'm excited to learn that
> there is a Racket mode...and hope it is as good as geiser).
> Regarding guard, one of its best features is support for
> notifications.  If you are using linux or MacOS, guard issues system
> notifications.  Emacs can also receive these notifications, so as I
> write code, I can see pass and failures in Emacs...pretty sweet.
> Taking everyone's comments into consideration, I'm going to try to
> come up with something Racket users can use outside of Dr. Racket -
> because I don't think I can support it using an existing framework
> like guard.   If I'm successful, I'll open-source release it.
> Thanks,
> Chad
> --
> Chad Albers
> On Fri, Aug 23, 2013 at 2:48 PM, Laurent <laurent.orseau at gmail.com> wrote:
>> On Fri, Aug 23, 2013 at 12:14 AM, Greg Hendershott
>> <greghendershott at gmail.com> wrote:
>>> In my opinion the "most Rackety" way to do tests these days is what
>>> Laurent mentioned: The `test` submodule.
>> When the tests become too long, I prefer to put them in a separate file
>> though.
>>> (Although when I do this, occasionally I wish for "test-folding" to
>>> hide the tests temporarily. Neat feature to add to DrRacket and/or
>>> emacs Racket mode?)
>> I've been wanting that for a long time too.
>> If only DrRacket had line-folding, we could fold any kind of submodule,
>> like documentation, test, main.
>>> Given that, I'm not familiar enough with Ruby "guard" to know what's
>>> left for a Racket "guard" to do -- just the detection for re-running
>>> some test automatically? As Laurent mentioned DrRacket already will do
>>> that automatically as you edit each file. For users of other editors,
>>> or for other scenarios like fetching from git, I suppose this would
>>> amount to keeping some cache of the last-modified or MD5 of all the
>>> sources, and running `raco test` ones that have changed?
>> Another automatic and easy way is to run the tests on file save, as a plugin
>> for DrRacket.
>> It should not be too difficult to extend Grant Rettke's DrSync plugin:
>> http://planet.plt-scheme.org/display.ss?package=drsync.plt&owner=grettke
>> Laurent
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Posted on the users mailing list.