From c3ff093ec7ccdd919aa40a85d3f23797b460be45 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 29 Mar 2024 11:32:58 +1300 Subject: [PATCH] Update --- test/runtests.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 523b9164..398dd93a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,6 +14,7 @@ using Test using Xpress function test_licensing() + ret = ENV["XPAUTH_PATH"] # Create a bogus license file xpauth_path = mktempdir() filename = joinpath(xpauth_path, "xpauth.xpr") @@ -21,6 +22,7 @@ function test_licensing() # Test that passing `""` can find our current license. This should already # be the case because we managed to install and start the tests... @test isfile(Xpress._get_xpauthpath("", false)) + delete!(ENV, "XPAUTH_PATH") # Test that using the test directory cannot find a license. @test_throws ErrorException Xpress._get_xpauthpath(@__DIR__, false) # Now're going to test checking for new licenses. To do so, we first need to @@ -29,6 +31,7 @@ function test_licensing() # Then, we can check that using the root fails to find a license @test_throws Xpress.XpressError Xpress.initialize(; xpauth_path) # Now we need to re-initialize the license so that we can run other tests. + ENV["XPAUTH_PATH"] = ret Xpress.initialize() return end