-
Notifications
You must be signed in to change notification settings - Fork 6
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
retest
requires you are located in the test/
dir of the package being tested (at least if using ReTest.hijack)
#29
Comments
Thanks for the report! The issue at hand here is basically that a The next problem is the use in Actually both problems are related: Then, another complication here is that |
I think this should be fixed on the master branch, if you like to try it out, you can use |
Thanks for workign on this! Using current master (via (@v1.6) pkg> activate ~/repos/ChainRules.jl
Activating environment at `~/repos/ChainRules.jl/Project.toml`
julia> using ChainRules, ReTest
[ Info: Precompiling ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2]
julia> ReTest.hijack(ChainRules, include_functions=[:include_test], include=:static)
ERROR: LoadError: ArgumentError: Package ChainRulesTestUtils not found in current path:
- Run `import Pkg; Pkg.add("ChainRulesTestUtils")` to install the ChainRulesTestUtils package.
Stacktrace:
[1] require(into::Module, mod::Symbol)
@ Base ./loading.jl:893
[2] include(mapexpr::Function, mod::Module, _path::String)
@ Base ./Base.jl:387
[3] include(mapexpr::Function, x::String)
@ Main.ChainRulesTests ~/.julia/packages/ReTest/Oh6iK/src/hijack.jl:224
[4] top-level scope
@ ~/.julia/packages/ReTest/Oh6iK/src/hijack.jl:260
[5] eval
@ ./boot.jl:360 [inlined]
[6] populate_mod!(mod::Module, path::String; lazy::Bool, Revise::Nothing, include::Symbol, include_functions::Vector{Symbol})
@ ReTest ~/.julia/packages/ReTest/Oh6iK/src/hijack.jl:257
[7] hijack(path::String, modname::Symbol; parentmodule::Module, lazy::Bool, revise::Nothing, include::Symbol, testset::Bool, include_functions::Vector{Symbol})
@ ReTest ~/.julia/packages/ReTest/Oh6iK/src/hijack.jl:225
[8] hijack(packagemod::Module, modname::Nothing; parentmodule::Module, lazy::Bool, revise::Nothing, include::Symbol, testset::Bool, include_functions::Vector{Symbol})
@ ReTest ~/.julia/packages/ReTest/Oh6iK/src/hijack.jl:302
[9] top-level scope
@ REPL[3]:1
in expression starting at /Users/nick/repos/ChainRules.jl/test/runtests.jl:4
|
Ah, but if i'm in an env with access to the test-only dependencies (e.g. via TestEnv.jl), then this works! (@v1.6) pkg> activate ~/repos/ChainRules.jl
Activating environment at `~/repos/ChainRules.jl/Project.toml`
julia> using ChainRules, ReTest, TestEnv
julia> TestEnv.activate()
"/var/folders/hx/1h0bbkfd18d4n1qrnwmrl4j00000gn/T/jl_AoHxyk/Project.toml"
julia> using ChainRules, ReTest, TestEnv
julia> ReTest.hijack(ChainRules, include_functions=[:include_test], include=:static)
[ Info: Precompiling ChainRulesTestUtils [cdddcdb0-9152-4a09-a978-84456f9df70a]
Testing ChainRules.jl
Main.ChainRulesTests
julia> retest()
Testing /Users/nick/repos/ChainRules.jl/test/test_helpers.jl:
0.013368 seconds (3.02 k allocations: 199.380 KiB, 39.03% compilation time)
Testing /Users/nick/repos/ChainRules.jl/test/rulesets/Core/core.jl:
...
... |
Yes I also used |
ReTest.jl needing to be in the test environment was the thing that brought me over the edge to creating TestEnv.jl. |
...i think that's what's going on :)
Here's the error i ran into when trying out ReTest.jl for the first time (using ReTest v0.3.0)
The text was updated successfully, but these errors were encountered: