
Creative Racket Competition 2022 https://racket.discourse.group/t/creative-racket-competition-2022-january-1-2022-february-28-2022/454?u=spdegabrielle

Is it possible with raco test
to run only a specific test suite (e.g. specified by it’s name)? I haven’t found anything in the docs.

No, there isn’t any functionality like that, although it would be nice to have.

I got the hint. :wink: I’m putting it on my todo list. :slightly_smiling_face:

I wasn’t trying to hint, just saying that it wasn’t intentionally omitted. :wink:

Sorry, I couldn’t help it. :smile:

But if you wanted to do it, then I think a good approach would be (a) having raco test
take an argument that sets some parameter that (b) rackunit
or other testing frameworks could read and decide to run/not run some tests.

I added a ticket to avoid that I forget your suggested approach (and also as a reference for me, of course): https://github.com/racket/racket/issues/4107

Hi @badkins! @soegaard2 told me that you found in-inclusive-range
to be slower than in-range
sometimes. Could you provide some examples?

<sigh> I didn’t even realize there was in-inclusive-range
:( I was using my own naive function, inclusive-range
, which simply returns a list :) Thanks for the tip!!

Ah!

Yeah, in-inclusive-range
should be as fast as in-range
. FWIW, inclusive-range
is also an actual function already pre-defined in Racket, too!

Of course, it’s even faster to code the loop manually, which is what I’m doing now…

Another thing is, even though range
and inclusive-range
return a list, if it appears directly within a for
clause, it should be as efficient as in-range
/in-inclusive-range
too.

I have changed some APIs in a module and now want to update the Scribble documentation. Since the documentation contains several executable code snippets, the document generation fails. Is there a way to get the documentation partially generated on a “best effort” basis, so it’s easier for me to see where I still need to make changes?

For now, I’ll comment out everything from the broken location until the end of the document, so I can at least generate the documentation up to the comment.

> a “best effort” basis, so it’s easier for me to see where I still need to make changes What happens currently? Does it refuse to render the document?

I think this should not be happening for run-time error—Scribble can already cope with that, but for compile-time error, I’m not sure. I thought it can cope with it too, but I might misremember

Without the commenting, it fails because I changed the name of a function that’s used in one of the code examples. So I get an error for an unbound identifier.

> but for compile-time error, I’m not sure. I thought it can cope with it too, but I might misremember Yes, I think my problem qualifies as a compile-time error (assuming the processing is like in #lang racket).

OK, I remember it wrong. Looks like both run-time and compile-time error result in failure alike

I wrote a package that does something similar, except that you need to modify the run-tests
invocation instead of using the command line to omit test suites. You could use that package as a starting point for what you want to do;


I’ll try it tomorrow because I’m too tired now, but from the documentation the package looks great! :slightly_smiling_face:

@sschwarzer add this to your Scribble file at the top
@(let ([this-handler (scribble-eval-handler)])
(scribble-eval-handler
(λ (f show? expr)
(with-handlers ([exn:fail? values])
(this-handler f show? expr)))))