|
1 | 1 | @testset "activate_set.jl" begin
|
2 | 2 | @testset "activate [extras]" begin
|
3 | 3 | orig_project_toml_path = Base.active_project()
|
| 4 | + push!(LOAD_PATH, mktempdir()) # put something weird in LOAD_PATH for testing |
| 5 | + orig_load_path = Base.LOAD_PATH |
4 | 6 | try
|
5 | 7 | TestEnv.activate("ChainRulesCore")
|
6 | 8 | new_project_toml_path = Base.active_project()
|
7 | 9 | @test new_project_toml_path != orig_project_toml_path
|
| 10 | + @test orig_load_path ⊆ Base.LOAD_PATH |
8 | 11 |
|
9 |
| - @eval using StaticArrays |
| 12 | + @eval using StaticArrays # From ChainRulesCore [extras] Project.toml |
| 13 | + @test isdefined(@__MODULE__, :StaticArrays) |
| 14 | + |
| 15 | + @eval using Compat # from ChainRulesCore Project.toml |
10 | 16 | @test isdefined(@__MODULE__, :StaticArrays)
|
11 | 17 | finally
|
12 | 18 | Pkg.activate(orig_project_toml_path)
|
|
15 | 21 |
|
16 | 22 | @testset "activate test/Project" begin
|
17 | 23 | orig_project_toml_path = Base.active_project()
|
| 24 | + push!(LOAD_PATH, mktempdir()) # put something weird in LOAD_PATH for testing |
| 25 | + orig_load_path = Base.LOAD_PATH |
18 | 26 | try
|
19 | 27 | # YAXArrays has a test/Project.toml, which contains CSV
|
20 | 28 | TestEnv.activate("YAXArrays")
|
21 | 29 | new_project_toml_path = Base.active_project()
|
22 | 30 | @test new_project_toml_path != orig_project_toml_path
|
| 31 | + @test orig_load_path ⊆ Base.LOAD_PATH |
23 | 32 |
|
24 | 33 | @eval using CSV
|
25 | 34 | @test isdefined(@__MODULE__, :CSV)
|
| 35 | + |
26 | 36 | finally
|
27 | 37 | Pkg.activate(orig_project_toml_path)
|
28 | 38 | end
|
|
0 commit comments