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

Block-level teardown code #2058

Open
fingolfin opened this issue Feb 27, 2023 · 2 comments · May be fixed by #2577
Open

Block-level teardown code #2058

fingolfin opened this issue Feb 27, 2023 · 2 comments · May be fixed by #2577

Comments

@fingolfin
Copy link
Contributor

For jldoctests, one can assign block-level setup code, but there doesn't seem to be a teardown counterpart. Application: modify a global setting before jldoctest starts (using setup code), and then resetting it afterwards (using teardown code).

Hypothetical example:

julia> foo(2)  # behavior depends on the global setting
4

Or perhaps there is already a way for this that I missed in the manual?

@mortenpi
Copy link
Member

This sounds reasonable to me. Maybe something like DocTestTeardown and teardown? Or is there a better antonym for "setup" in this context?

@fingolfin
Copy link
Contributor Author

Those names sound good to me. I don't know a better antonym to "setup" than teardown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants