-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using racket-test
without a test submodule
#506
Comments
I searched and I think you mean this post: https://groups.google.com/g/racket-users/c/_264OkcugwM/m/trrMVmQJAQAJ?
I think that should be possible and is probably the best way to handle this. p.s. Maybe nit-picky but maybe useful to know: The thing I snipped from the middle of your sentence was
So TL;DR I like your suggestion, to have |
More details as they bubble up from my memory: The other cool (IMO) thing about The way So I don't want to change |
The reason I mentioned (Sidenote: a very nice feature of DrR is that the coverage information gets updated live, as you enter additional REPL expressions... This turns out to be really useful for demonstrating execution in a lazy language since it visualizes the non-execution and later the by-demand execution of various bits.) |
This is re a post made on the mailing list recently (cc @Nineluj) by a student in my class who is trying to use
racket-mode
with Emacs.The problem is that the modules that are generated by the class language(s) don't have a
test
submodule, and instead tests are just toplevel expressions. (The reason for that is that it predates submodules, and I don't have enough time to allocate to reorganizing the languages and the surrounding machinery to all switch to submodules.) However, it looks like it should be relatively easy to make such a situation work: IIUC,racket-run
(after the recent 5226366) will run amain
submodule, and if that's not present, it will run the module itself --- but it does not include coverage information. OTOH,racket-test
can do that, but it is hard-wired to running thetest
submodule.Would it be possible to make
racket-test
run the module itself when there is notest
submodule in an analogous way toracket-run
&main
? That would make it be useful in cases where there is notest
module. If not, then maybe a custom option that can make it try the module itself rather than the submodules? And another option would be to add the option of coverage information forracket-run
too? (I'd try patching it myself, but I couldn't figure out the details.)FWIW, I managed to make the languages add a
(module+ test)
at the end, which made it possible to useracket-test
and see the coverage results, but the REPL that you get after that is in the context of the test submodule, and probably due to low-level games with typed-racket, the resulting repl is useless (has no type information).(BTW, the package that is used is in the old archive format, it can be installed with
raco -DA
.)The text was updated successfully, but these errors were encountered: