diff --git a/.zenodo.json b/.zenodo.json index 8e98373f7..539036d03 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -765,6 +765,11 @@ "name": "Alexander Von Moll", "orcid": "0000-0002-7661-5752", "type": "Other" + }, + { + "name": "Syver Døving Agdestein", + "orcid": "0000-0002-1589-2916", + "type": "Other" } ], "upload_type": "software" diff --git a/src/animation.jl b/src/animation.jl index aec29fb36..2b0847963 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -13,7 +13,7 @@ struct Animation frames::Vector{String} end -Animation() = Animation(convert(String, mktempdir()), String[]) +Animation(dir = convert(String, mktempdir())) = Animation(dir, String[]) """ frame(animation[, plot]) diff --git a/test/test_animations.jl b/test/test_animations.jl index 4ad7fe2e6..cc1025053 100644 --- a/test/test_animations.jl +++ b/test/test_animations.jl @@ -1,3 +1,14 @@ +@testset "Animation constructors" begin + @test Animation() isa Animation + @test Animation("dir") isa Animation + @test Animation("dir", String[]) isa Animation +end + +@testset "Missing animation directory" begin + anim = Animation("nonexisting_dir") + @test_throws SystemError frame(anim, plot([1, 2, 3])) +end + @testset "Empty anim" begin anim = @animate for i in [] end