Skip to content

Make variables and functions in parent scope available within @trixi_testset #8

@benegee

Description

@benegee

This came up while working on #6 .

It would be nice if we could write

f(x) = ...
@trixi_testset "" begin
    #use f
end

as can be done with Test.jl's @testset. This is currently not possible with @trixi_testset because we wrap everything inside a dedicated module TrixiTestModule

Should we add syntax like $EXAMPLES_DIR to look up things in the parent, instead of special casing?

This is how BenchmarkTools does it https://github.com/JuliaCI/BenchmarkTools.jl/blob/cddd794ba336763be6831cfa076d27df96ef893c/src/execution.jl#L361-L380

Originally posted by @vchuravy in #6 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions