Skip to content

Commit

Permalink
use v"1.4-" and similar with trailing dash in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkapur committed Jul 29, 2023
1 parent 81abc95 commit a28a9af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test/activate_do.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

orig_project = Base.active_project()

if VERSION >= v"1.4"
if VERSION >= v"1.4-"
direct_deps() = [v.name for (_,v) in Pkg.dependencies() if v.is_direct_dep]
crc_deps = TestEnv.activate(direct_deps, "ChainRulesCore")
@test "ChainRulesCore" crc_deps
Expand All @@ -20,7 +20,7 @@

# We use endswith here because on MacOS GitHub runners for some reasons the paths are slightly different
# We also skip on Julia 1.2 and 1.3 on Windows because it is using 8 character shortened paths in one case
if !((v"1.2" <= VERSION < v"1.4") && Sys.iswindows())
if !((v"1.2-" <= VERSION < v"1.4-") && Sys.iswindows())
@test endswith(Base.active_project(), orig_project)
end
end
Expand All @@ -30,7 +30,7 @@
mktempdir() do p
Pkg.activate(p)

if VERSION >= v"1.4"
if VERSION >= v"1.4-"
Pkg.add(PackageSpec(name="MCMCDiagnosticTools", version="0.1.0"))

orig_project = Base.active_project()
Expand All @@ -42,7 +42,7 @@
@test isdefined(@__MODULE__, :FFTW)

@test endswith(Base.active_project(), orig_project)
elseif VERSION >= v"1.2"
elseif VERSION >= v"1.2-"
Pkg.add(PackageSpec(name="ConstraintSolver", version="0.6.10"))

orig_project = Base.active_project()
Expand Down
6 changes: 3 additions & 3 deletions test/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
mktempdir() do p
Pkg.activate(p)

if VERSION >= v"1.4"
if VERSION >= v"1.4-"
Pkg.add(PackageSpec(name="YAXArrays", version="0.1.3"))

orig_project_toml_path = Base.active_project()
Expand All @@ -49,7 +49,7 @@
finally
Pkg.activate(orig_project_toml_path)
end
elseif VERSION >= v"1.2"
elseif VERSION >= v"1.2-"
Pkg.add(PackageSpec(name="ConstraintSolver", version="0.6.10"))

orig_project_toml_path = Base.active_project()
Expand All @@ -71,7 +71,7 @@
end
end

if VERSION >= v"1.4"
if VERSION >= v"1.4-"
# https://github.com/JuliaTesting/TestEnv.jl/issues/26
@test isdefined(TestEnv, :isfixed)
end
Expand Down

0 comments on commit a28a9af

Please sign in to comment.