Skip to content

Commit

Permalink
Move some inclusions to setup_tests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Jan 10, 2025
1 parent 4d0603c commit 12a407f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 32 deletions.
8 changes: 0 additions & 8 deletions test/LieTheory/WeylGroup.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
if !isdefined(Main, :test_Group_interface)
import Oscar.AbstractAlgebra
import Oscar.AbstractAlgebra: Group
include(
joinpath(dirname(pathof(AbstractAlgebra)), "..", "test", "Groups-conformance-tests.jl")
)
end

@testset "LieTheory.WeylGroup" begin
function is_in_normal_form(x::WeylGroupElem)
return word(parent(x)(word(x))) == word(x)
Expand Down
13 changes: 10 additions & 3 deletions test/LieTheory/setup_tests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
if !isdefined(Main, :test_mutating_op_like_zero)
import Oscar.AbstractAlgebra
include(
joinpath(
pathof(Oscar.Nemo.AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"
),
joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl")
)
end

if !isdefined(Main, :test_Group_interface)
import Oscar.AbstractAlgebra
import Oscar.AbstractAlgebra: Group
include(
joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Groups-conformance-tests.jl")
)
end

Expand Down
5 changes: 0 additions & 5 deletions test/Rings/AbelianClosure.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if !isdefined(Main, :test_Field_interface)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end

function test_elem(K::QQAbField)
ns = rand(1:8, 3)
zs = map(n -> sum(rand(-10:10) * gen(K)(n)^rand(1:n) for j in 1:10), ns)
Expand Down
5 changes: 0 additions & 5 deletions test/Rings/AlgClosureFp.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if !isdefined(Main, :test_Field_interface)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end

function test_elem(K::AlgClosure{T}) where T <: FinField
d = rand(1:8)
F = ext_of_degree(K, d)
Expand Down
5 changes: 0 additions & 5 deletions test/Rings/PBWAlgebraQuo.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if !isdefined(Main, :test_NCRing_interface)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end

function test_elem(Q::PBWAlgQuo{QQFieldElem})
R = base_ring(Q)
return Q(R(rand(base_ring(R), 1:4, 1:4, 1:4)))
Expand Down
6 changes: 0 additions & 6 deletions test/Rings/mpoly-localizations.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
const rng = Oscar.get_seeded_rng()

if !isdefined(Main, :test_Ring_interface_recursive)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end

@testset "mpoly-localizations" begin
R, variab = ZZ[:x, :y]
x = variab[1]
Expand Down
4 changes: 4 additions & 0 deletions test/Rings/setup_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if !isdefined(Main, :test_Field_interface) || !isdefined(Main, :test_NCRing_interface)
import Oscar.AbstractAlgebra
include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl"))
end

0 comments on commit 12a407f

Please sign in to comment.