diff --git a/test/AlgebraicGeometry/Schemes/FunctionFields.jl b/test/AlgebraicGeometry/Schemes/FunctionFields.jl index 9a1781df7d93..7b7e838faac0 100644 --- a/test/AlgebraicGeometry/Schemes/FunctionFields.jl +++ b/test/AlgebraicGeometry/Schemes/FunctionFields.jl @@ -1,5 +1,10 @@ const rng = Oscar.get_seeded_rng() +if !isdefined(Main, :test_Field_interface) + import Oscar.AbstractAlgebra + include(joinpath(pathof(AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl")) +end + function test_elem(K::VarietyFunctionField) F = representative_field(K) P = base_ring(F)::MPolyRing diff --git a/test/Groups/conformance.jl b/test/Groups/conformance.jl index a37f33d86955..154b6ff2f973 100644 --- a/test/Groups/conformance.jl +++ b/test/Groups/conformance.jl @@ -1,9 +1,10 @@ L = [ alternating_group(5), cyclic_group(18), SL(3,3), free_group(0), free_group(1), free_group(2) ] -import Oscar.AbstractAlgebra -import Oscar.AbstractAlgebra: Group - -include(joinpath(dirname(pathof(AbstractAlgebra)), "..", "test", "Groups-conformance-tests.jl")) +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 "GAPGroups_interface_conformance $G of type $(typeof(G))" for G in L diff --git a/test/LieTheory/WeylGroup.jl b/test/LieTheory/WeylGroup.jl index fbf9120bd38a..379cc699be38 100644 --- a/test/LieTheory/WeylGroup.jl +++ b/test/LieTheory/WeylGroup.jl @@ -1,9 +1,3 @@ -import Oscar.AbstractAlgebra -import Oscar.AbstractAlgebra: Group -include( - joinpath(dirname(pathof(AbstractAlgebra)), "..", "test", "Groups-conformance-tests.jl") -) - @testset "LieTheory.WeylGroup" begin function is_in_normal_form(x::WeylGroupElem) return word(parent(x)(word(x))) == word(x) @@ -348,7 +342,7 @@ include( @test parent(x) === x.parent @test parent(x) isa WeylGroup end - + @testset "reflection" begin for i in 2:4 R = root_system(:A, i) @@ -411,7 +405,7 @@ include( end end end - + @testset "ReducedExpressionIterator" begin W = weyl_group(:A, 3) s = gens(W) diff --git a/test/LieTheory/setup_tests.jl b/test/LieTheory/setup_tests.jl index e3c3c4f541d4..0519485de4bb 100644 --- a/test/LieTheory/setup_tests.jl +++ b/test/LieTheory/setup_tests.jl @@ -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 diff --git a/test/Rings/PBWAlgebraQuo.jl b/test/Rings/PBWAlgebraQuo.jl index e33b52b1ddb5..c333a03c8f07 100644 --- a/test/Rings/PBWAlgebraQuo.jl +++ b/test/Rings/PBWAlgebraQuo.jl @@ -1,3 +1,8 @@ +function test_elem(Q::PBWAlgQuo{QQFieldElem}) + R = base_ring(Q) + return Q(R(rand(base_ring(R), 1:4, 1:4, 1:4))) +end + @testset "PBWAlgebraQuo.constructor" begin r, (x, y, z) = QQ[:x, :y, :z] R, (x, y, z) = pbw_algebra(r, [0 x*y x*z; 0 0 y*z + 1; 0 0 0], deglex(r)) @@ -25,11 +30,6 @@ end @test string(one(R)) == "1" end -function test_elem(Q::PBWAlgQuo{QQFieldElem}) - R = base_ring(Q) - return Q(R(rand(base_ring(R), 1:4, 1:4, 1:4))) -end - @testset "PBWAlgebraQuo.conformance" begin r, (a, h, f, e) = QQ[:a, :h, :f, :e] rel = @pbw_relations(e*f == f*e-h, e*h == h*e+2*e, f*h == h*f-2*f) diff --git a/test/Rings/setup_tests.jl b/test/Rings/setup_tests.jl new file mode 100644 index 000000000000..78177924a4e2 --- /dev/null +++ b/test/Rings/setup_tests.jl @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index a3293ac8b99d..d7f1a0d96483 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -50,9 +50,6 @@ if VERSION >= v"1.8.0" @everywhere GC.enable_logging(true) end -@everywhere import Oscar.Nemo.AbstractAlgebra -@everywhere include(joinpath(pathof(Oscar.Nemo.AbstractAlgebra), "..", "..", "test", "Rings-conformance-tests.jl")) - # hotfix, otherwise StraightLinePrograms returns something which then leads to an error module SLPTest end