Skip to content

Commit 68c2778

Browse files
authored
Fail test instead of producing an error when not interactive or updating
1 parent b4de2fa commit 68c2778

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/test_reference.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,13 @@ function test_reference(
162162
""" reference = reference_path actual = actual_path
163163

164164
if !isinteractive() && !force_update()
165-
error("""
165+
@info """
166166
To update the reference images either run the tests interactively with 'include(\"test/runtests.jl\")',
167167
or to force-update all failing reference images set the environment variable `JULIA_REFERENCETESTS_UPDATE`
168168
to "true" and re-run the tests via Pkg.
169-
""")
170-
end
171-
172-
if force_update() || input_bool("Replace reference with actual result?")
169+
"""
170+
@test false
171+
elseif force_update() || input_bool("Replace reference with actual result?")
173172
mv(actual_path, reference_path; force=true) # overwrite old file it
174173
@info "Please run the tests again for any changes to take effect"
175174
else

0 commit comments

Comments
 (0)