Email or username:

Password:

Forgot your password?
Arne Babenhauserheide

@abcdw Regarding testing: do you know my doctest module? hg.sr.ht/~arnebab/wisp/browse/

That’s how I want procedure-tests to work.

To execute the tests in the module when running the main proc:

(define %this-module (current-module))
(define (main args)
(doctests-testmod %this-module))

5 comments
Andrew Tropin

@ArneBab I didn't know about it, but it's a cool idea, thank you! Maybe I'll borrow some parts of it.

Arne Babenhauserheide

@abcdw The implementation is normally GPL licensed, but if you want to integrate it into something where that’s not possible, I can open it up to another license.

Ideally I’d like to turn it into an SRFI, then it would become MIT or BSD-3 licensed.

If that’s something you’d be interested in, I’d love to support you (I just don’t have the time to do it myself at the moment — and didn’t have that for the past years, otherwise it would already be an SRFI).

Andrew Tropin

@ArneBab I would like to make my current work on tests APIs to be SRFI as well, but IDK if I will be able to make it guile-agnostic.

Anyway, I'll keep in mind the idea of tests in procedure's metadata and will let you know if I do something like that or would be able to integrate your work. Thank you for ideas, knowledge and your support! :)

Arne Babenhauserheide

@abcdw An implementation for a SRFI does not have to be implementation agnostic, though that’s preferred.

The doctests here are the result of starting with Python-style doctests, then discussing that in the Guile list and finding this cleaner solution. Thanks to homoiconicity, we can write real code in the properties that then gets executed. This saves us from problems like the different quoting and multi-line stuff in Python-doctests.

Andrew Tropin

@ArneBab Wow, I didn't know that we can attach metadata for function by providing a vector with metadata before body!

Go Up