-
Notifications
You must be signed in to change notification settings - Fork 481
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
Integrate doctest with testsets #1053
Comments
There are actually two separate ideas here: (1) provide a simplest possible API for Regarding the testset integration: yep, I think it's a good idea. For the time being though, it's up for grabs -- it needs a slightly more sophisticate implementation for |
What exactly is left to be done here, given that So perhaps it can be closed? Otherwise someone could perhaps clarify what is missing... The main slightly annoying thing I know of is that a few global settings like For us, we have essentially resolved this by establishing a pattern like this: DocMeta.setdocmeta!(MyPackage, :DocTestSetup, MyPackage.doctestsetup(); recursive=true)
doctest(MyPackage) where This then has the added advantage that we can also reuse it in our
(It is still annoying that I have to remember to duplicate this in each I am not sure whether I should try to derive feature requests for this. But perhaps it would be worth documenting this workflow somewhere, perhaps some other people would benefit from it? |
Yea, I think this should have been closed ages ago, so I'll do it now. Let's have separate issues for any follow-ups.
I think it's worth documenting common and useful workarounds. And we should also try to figure out if there's some nice approach how we could avoid the duplication -- I agree it's a wart. I don't have any immediately obvious ideas though. |
This issue is a follow up on #774 and #198, and what a nice public API for that functionality might look like.
My own preference would be something like this in my
runtests.jl
:I.e. ideally I don't really want to deal with any subtleties at all, but would just like to call one function, and have it sort out everything. In terms of testset integration, my preference would be if
run_all_doctests
started a new (child) testset and then put each doctest into that testset.The name for the function is not great, this is more an idea how the API should feel like.
The text was updated successfully, but these errors were encountered: