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

Bug: Error while running in @safetestset #106

Closed
iskyd opened this issue Mar 9, 2023 · 2 comments
Closed

Bug: Error while running in @safetestset #106

iskyd opened this issue Mar 9, 2023 · 2 comments

Comments

@iskyd
Copy link

iskyd commented Mar 9, 2023

runtests.jl

cd(@__DIR__)

using Pkg

using Test, TestSetExtensions, SafeTestsets

@testset ExtendedTestSet "Example tests" begin
  @includetests ARGS
end

test.jl

@safetestset "test" begin
    using Mocking
    
    Mocking.activate()
    patch = @patch open(fn::Function, f::AbstractString) = fn(IOBuffer(data))
end

This throws
LoadError: UndefVarError: @patch not defined

Julia version: 1.8.2
Operating System: Ubuntu 22.04
Mocking version:

@rofinn
Copy link
Collaborator

rofinn commented Mar 9, 2023

Can we close this as it appears to be a duplicate of #107 ?

@iskyd
Copy link
Author

iskyd commented Mar 9, 2023

Yeah! Not sure what happened here. Sorry for duplicate.

@rofinn rofinn closed this as completed Mar 9, 2023
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

No branches or pull requests

2 participants