From bddfc9e7caaf7a3cc856ca8eafbe7392725541e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Wed, 23 Apr 2025 23:53:30 +0200 Subject: [PATCH 1/2] Shorter testset name for Bridges.runtests --- src/Bridges/Bridges.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Bridges/Bridges.jl b/src/Bridges/Bridges.jl index 9e742c8517..debebd1be2 100644 --- a/src/Bridges/Bridges.jl +++ b/src/Bridges/Bridges.jl @@ -176,7 +176,10 @@ function _test_structural_identical( constraints = Dict{Any,Any}() a_constraint_types = MOI.get(a, MOI.ListOfConstraintTypesPresent()) b_constraint_types = MOI.get(b, MOI.ListOfConstraintTypesPresent()) - Test.@testset "get $F and $S" for (F, S) in a_constraint_types + _str(T) = MOI.Utilities._drop_moi(string(T)) + Test.@testset "get $(_str(F)) and $(_str(S))" for (F, S) in + a_constraint_types + Test.@test MOI.supports_constraint(a, F, S) constraints[(F, S)] = map(MOI.get(a, MOI.ListOfConstraintIndices{F,S}())) do ci @@ -190,7 +193,7 @@ function _test_structural_identical( Test.@test (F, S) in b_constraint_types || MOI.get(a, MOI.NumberOfConstraints{F,S}()) == 0 end # COV_EXCL_LINE - Test.@testset "$F-in-$S" for (F, S) in b_constraint_types + Test.@testset "$(_str(F))-in-$(_str(S))" for (F, S) in b_constraint_types Test.@test haskey(constraints, (F, S)) # Check that the same number of constraints are present Test.@test MOI.get(a, MOI.NumberOfConstraints{F,S}()) == From 2922cc93f7ec5cecdc6a44df6c8013cf0a91f8ed Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Thu, 24 Apr 2025 09:58:32 +1200 Subject: [PATCH 2/2] Update Bridges.jl --- src/Bridges/Bridges.jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Bridges/Bridges.jl b/src/Bridges/Bridges.jl index debebd1be2..0a6d799634 100644 --- a/src/Bridges/Bridges.jl +++ b/src/Bridges/Bridges.jl @@ -176,10 +176,8 @@ function _test_structural_identical( constraints = Dict{Any,Any}() a_constraint_types = MOI.get(a, MOI.ListOfConstraintTypesPresent()) b_constraint_types = MOI.get(b, MOI.ListOfConstraintTypesPresent()) - _str(T) = MOI.Utilities._drop_moi(string(T)) - Test.@testset "get $(_str(F)) and $(_str(S))" for (F, S) in - a_constraint_types - + _name(F, S) = MOI.Utilities._drop_moi("$F-in-$S") + Test.@testset "get $(_name(F, S))" for (F, S) in a_constraint_types Test.@test MOI.supports_constraint(a, F, S) constraints[(F, S)] = map(MOI.get(a, MOI.ListOfConstraintIndices{F,S}())) do ci @@ -193,7 +191,7 @@ function _test_structural_identical( Test.@test (F, S) in b_constraint_types || MOI.get(a, MOI.NumberOfConstraints{F,S}()) == 0 end # COV_EXCL_LINE - Test.@testset "$(_str(F))-in-$(_str(S))" for (F, S) in b_constraint_types + Test.@testset "$(_name(F, S))" for (F, S) in b_constraint_types Test.@test haskey(constraints, (F, S)) # Check that the same number of constraints are present Test.@test MOI.get(a, MOI.NumberOfConstraints{F,S}()) ==