|
From: | Luis Felipe López Acevedo |
Subject: | Re: How do I run a whole test suite with Guile's default test runner |
Date: | Wed, 18 Mar 2015 17:34:46 -0500 |
User-agent: | Roundcube Webmail/1.0.5 |
On 2015-03-18 17:17, address@hidden wrote:
Luis Felipe López Acevedo <address@hidden> writes:Hi, I'm learning to program in Guile Scheme and currently reading and practicing unit testing with SRFI-64. How do I make the default test runner in Guile run my whole test suite? I put all tests in a tests directory (see <https://bitbucket.org/sirgazil/guilelab/src>). Thanks,The way you wrote that file, the test suite will be run when you loadthe module. Instead, you could wrap all those top-level forms (sans themodule declaration) in some kind of 'main' procedure.
Yeah, loading the module is what I currently use to run the tests in one file, but that won't be convenient when I add more modules and tests. I thought that maybe there was something like Python's test discovery, where you run `$ python -m unittest` and it will find all the tests instead of loading files individually by hand.
Maybe I'll try using a main procedure as you suggest.
And for what it's worth, I have an arguably cleaner implementation of SRFI-64 here, but it's an R7RS library so it won't work out-of-the-box on Guile yet: https://gitorious.org/taylan-scheme/srfi/ Taylan
Thanks, Taylan :) -- Luis Felipe López Acevedo http://sirgazil.bitbucket.org/
[Prev in Thread] | Current Thread | [Next in Thread] |