Skip to content
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

Open
davidanthoff opened this issue Jul 1, 2019 · 1 comment
Open

Integrate doctest with testsets #1053

davidanthoff opened this issue Jul 1, 2019 · 1 comment

Comments

@davidanthoff
Copy link
Contributor

davidanthoff commented Jul 1, 2019

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:

using Documenter, Test, MyPackage

@testset "MyPackage" begin

include("test_featureA.jl")

Documenter.run_all_doctests("MyPackage")

end

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.

@mortenpi
Copy link
Member

mortenpi commented Jul 1, 2019

There are actually two separate ideas here: (1) provide a simplest possible API for runtests.jl, and (2) integrate it with testsets. I'll dedicate this issue for the testset integration and and leave the API discussion for #1051.

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 doctest.

@mortenpi mortenpi changed the title Doctest API Integrate doctest with testsets Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants