Skip to content

Commit 178060e

Browse files
authored
[Test] simplify import Base.Test workaround (#2670)
1 parent 088a732 commit 178060e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Test/Test.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
module Test
88

99
import LinearAlgebra
10-
1110
import MathOptInterface as MOI
1211
import MathOptInterface.Utilities as MOIU
1312

@@ -28,14 +27,10 @@ MOI has the problematic feature that MOI.Test.Test is not self-referential,
2827
and JET.jl appropriately complains with "invalid redefinition of constant
2928
Test."
3029
31-
The work-around is to wrap `Test` in a module so that `MOI.Test.Test` is
32-
`MOI.Test`.
30+
The work-around is to pull in only a subset of symbols from `Test` (and not Test
31+
ifself) so that `MOI.Test.Test === MOI.Test`.
3332
=#
34-
module _BaseTest
35-
import Test: @testset, @test, @test_throws, @inferred
36-
end
37-
38-
import ._BaseTest: @testset, @test, @test_throws, @inferred
33+
using Test: @testset, @test, @test_throws, @inferred
3934

4035
# Be wary of adding new fields to this Config struct. Always think: can it be
4136
# achieved a different way?

0 commit comments

Comments
 (0)