Skip to content

Commit

Permalink
Merge pull request #3289 from JuliaReach/schillic/test_version
Browse files Browse the repository at this point in the history
Better test for package version
  • Loading branch information
schillic authored Apr 30, 2023
2 parents 93577b3 + 4d92924 commit 97b5588
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions test/LazyOperations/Intersection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ for N in [Float64, Rational{Int}, Float32]
I2 = Hyperplane(ones(N, 2), N(1)) HalfSpace(ones(N, 2), N(1))
# the next test fails with the "EXACT" solver GLPK older than v0.15.3
# see https://github.com/jump-dev/GLPK.jl/issues/207
mf = Pkg.Operations.Context().env.manifest
ver = mf[findfirst(v -> v.name == "GLPK", mf)].version
if N != Rational{Int} || ver >= v"0.15.3"
if N != Rational{Int} || PkgVersion.Version(LazySets.GLPK) >= v"0.15.3"
@test !isbounded(I2) && !isboundedtype(typeof(I2))
end

Expand Down
5 changes: 3 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
MiniQhull = "978d7f02-9e05-4691-894f-ae31a51d76ca"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PkgVersion = "eebad327-c553-4316-9ea0-9fa01ccd7688"
Polyhedra = "67491407-f73d-577b-9b50-8179a7c68029"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RangeEnclosures = "1b4d18b6-9e5d-11e9-236c-f792b01831f8"
Expand All @@ -34,13 +34,14 @@ Expokit = "0.2"
ExponentialUtilities = "1"
GR = "0"
IntervalArithmetic = "0.15 - 0.20"
Ipopt = "1"
# IntervalConstraintProgramming = "0.9 - 0.12"
IntervalMatrices = "0.8"
Ipopt = "1"
Javis = "0.5 - 0.9"
Makie = "0.9 - 0.19"
MiniQhull = "0.1 - 0.4"
Optim = "0.15 - 0.22, 1"
PkgVersion = "0.3"
Polyhedra = "0.6 - 0.7"
RangeEnclosures = "0.1.1"
RecipesBase = "0.6 - 0.8, 1"
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Random.seed!(1234)
# ========================
# Optional dependencies
# ========================
import Distributions, ExponentialUtilities, Expokit,
IntervalMatrices, Ipopt, Optim, Pkg, TaylorModels, RangeEnclosures
import Distributions, ExponentialUtilities, Expokit, IntervalMatrices, Ipopt,
Optim, PkgVersion, TaylorModels, RangeEnclosures
import IntervalArithmetic as IA
using IntervalArithmetic: IntervalBox
using IntervalMatrices: ±, IntervalMatrix
Expand Down

0 comments on commit 97b5588

Please sign in to comment.