From 68c277862de25def4995ace3c41065006eb71db5 Mon Sep 17 00:00:00 2001 From: Mike Boyle Date: Mon, 22 Jul 2024 10:17:38 -0400 Subject: [PATCH] Fail test instead of producing an error when not interactive or updating --- src/test_reference.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test_reference.jl b/src/test_reference.jl index 98af86f..9a43f1c 100644 --- a/src/test_reference.jl +++ b/src/test_reference.jl @@ -162,14 +162,13 @@ function test_reference( """ reference = reference_path actual = actual_path if !isinteractive() && !force_update() - error(""" + @info """ To update the reference images either run the tests interactively with 'include(\"test/runtests.jl\")', or to force-update all failing reference images set the environment variable `JULIA_REFERENCETESTS_UPDATE` to "true" and re-run the tests via Pkg. - """) - end - - if force_update() || input_bool("Replace reference with actual result?") + """ + @test false + elseif force_update() || input_bool("Replace reference with actual result?") mv(actual_path, reference_path; force=true) # overwrite old file it @info "Please run the tests again for any changes to take effect" else