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

Better error message for @testsetup missing module #70

Closed
nickrobinson251 opened this issue May 30, 2023 · 0 comments · Fixed by #77
Closed

Better error message for @testsetup missing module #70

nickrobinson251 opened this issue May 30, 2023 · 0 comments · Fixed by #77

Comments

@nickrobinson251
Copy link
Collaborator

this typo lead to an unhelpful error message:

  # foo.jl
  @testsetup FooSetup   # <-- should be `@testsetup module FooSetup`
      x = 1
  end
julia> using ReTestItems

julia> include("foo.jl")
ERROR: LoadError: type Symbol has no field head
Stacktrace:
 [1] getproperty(x::Symbol, f::Symbol)
   @ Base ./Base.jl:38
 [2] var"@testsetup"(__source__::LineNumberNode, __module__::Module, mod::Any)
   @ ReTestItems ~/repos/ReTestItems.jl/src/macros.jl:51
 [3] include(fname::String)
   @ Base.MainInclude ./client.jl:476
 [4] top-level scope
   @ REPL[9]:1
in expression starting at /Users/nickr/repos/ReTestItems.jl/foo.jl:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant