mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
use NullLogger to suppress warnings
This commit is contained in:
parent
93d97ff75f
commit
9e867a58e6
@ -8,6 +8,7 @@ Folds = "41a02a25-b8f0-4f67-bc48-60067656b558"
|
||||
GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120"
|
||||
KnuthBendix = "c2604015-7b3d-4a30-8a26-9074551ec60a"
|
||||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
|
||||
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
|
||||
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
||||
PermutationGroups = "8bc5a954-2dfc-11e9-10e6-cd969bffa420"
|
||||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
|
||||
|
@ -1,6 +1,7 @@
|
||||
module Groups
|
||||
|
||||
import Folds
|
||||
import Logging
|
||||
|
||||
using GroupsCore
|
||||
import GroupsCore.Random
|
||||
|
@ -10,7 +10,10 @@ function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, k
|
||||
maxrules = 1000*n
|
||||
|
||||
rws = KnuthBendix.RewritingSystem(rels, ordering(A))
|
||||
KnuthBendix.knuthbendix!(rws; maxrules=maxrules, kwargs...)
|
||||
Logging.with_logger(Logging.NullLogger()) do
|
||||
# the rws is not confluent, let's suppress warning about it
|
||||
KnuthBendix.knuthbendix!(rws; maxrules=maxrules, kwargs...)
|
||||
end
|
||||
return AutomorphismGroup(F, S, rws, ntuple(i -> gens(F, i), n))
|
||||
end
|
||||
|
||||
|
@ -176,12 +176,13 @@
|
||||
)
|
||||
end
|
||||
|
||||
@testset "GroupsCore conformance" begin
|
||||
test_Group_interface(A)
|
||||
g = A(rand(1:length(alphabet(A)), 10))
|
||||
h = A(rand(1:length(alphabet(A)), 10))
|
||||
Logging.with_logger(Logging.NullLogger()) do
|
||||
@testset "GroupsCore conformance" begin
|
||||
test_Group_interface(A)
|
||||
g = A(rand(1:length(alphabet(A)), 10))
|
||||
h = A(rand(1:length(alphabet(A)), 10))
|
||||
|
||||
test_GroupElement_interface(g, h)
|
||||
test_GroupElement_interface(g, h)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -54,9 +54,14 @@
|
||||
Groups.normalform!(h)
|
||||
@test h == H([5])
|
||||
|
||||
@testset "GroupsCore conformance: H" begin
|
||||
test_Group_interface(H)
|
||||
test_GroupElement_interface(rand(H, 2)...)
|
||||
end
|
||||
@test_logs (:warn, "using generic isfiniteorder(::AbstractFPGroupElement): the returned `false` might be wrong") isfiniteorder(h)
|
||||
|
||||
@test_logs (:warn, "using generic isfinite(::AbstractFPGroup): the returned `false` might be wrong") isfinite(H)
|
||||
|
||||
Logging.with_logger(Logging.NullLogger()) do
|
||||
@testset "GroupsCore conformance: H" begin
|
||||
test_Group_interface(H)
|
||||
test_GroupElement_interface(rand(H, 2)...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -23,12 +23,14 @@ using Groups.MatrixGroups
|
||||
_, sizes = Groups.wlmetric_ball_serial(S, radius=4);
|
||||
@test sizes == [7, 33, 141, 561]
|
||||
|
||||
@testset "GroupsCore conformance" begin
|
||||
test_Group_interface(SL3Z)
|
||||
g = A(rand(1:length(alphabet(SL3Z)), 10))
|
||||
h = A(rand(1:length(alphabet(SL3Z)), 10))
|
||||
Logging.with_logger(Logging.NullLogger()) do
|
||||
@testset "GroupsCore conformance" begin
|
||||
test_Group_interface(SL3Z)
|
||||
g = SL3Z(rand(1:length(alphabet(SL3Z)), 10))
|
||||
h = SL3Z(rand(1:length(alphabet(SL3Z)), 10))
|
||||
|
||||
test_GroupElement_interface(g, h)
|
||||
test_GroupElement_interface(g, h)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -2,6 +2,8 @@ using Test
|
||||
using Groups
|
||||
using PermutationGroups
|
||||
|
||||
import Logging
|
||||
|
||||
import KnuthBendix: Word
|
||||
|
||||
using GroupsCore
|
||||
|
Loading…
Reference in New Issue
Block a user