Test.jl seems to have problems catching ArgParse.jl's exceptions

pkalaczynski
Sat, 23 Aug 2025 20:14:14 +0000
General Usage

Hi,

I’ve been implementing unit tests for my project, and generally I’m very happy with Test.jl, however I stumbled across a weird problem when trying to do tests for argument parsing. I handle it using ArgParse.jl and when running locally, @test_throws Exception parse_commandline() works fine. However, when I run it through Pkg.test(), I suddenly get an Error about a required option not being specified (I have 1 arg set as required for my project). I admit I’m not even sure if this is a problem with Test.jl or with ArgParse.jl (or my implementation ). Any suggestions would be highly welcome.

7 posts - 2 participants