File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,24 @@ def test_interactive():
2222 juliacall .interactive (True )
2323 juliacall .interactive (False )
2424
25+ def test_JuliaError ():
26+ import juliacall
27+ jl = juliacall .Main
28+ assert isinstance (juliacall .JuliaError , type )
29+ assert issubclass (juliacall .JuliaError , Exception )
30+ try :
31+ juliacall .Base .error ("test error" )
32+ err = None
33+ except juliacall .JuliaError as e :
34+ err = e
35+ assert err is not None
36+ assert isinstance (err , juliacall .JuliaError )
37+ exc = err .exception
38+ assert jl .isa (exc , jl .ErrorException )
39+ assert str (exc .msg ) == "test error"
40+ bt = err .backtrace
41+ assert bt is not None
42+
2543def test_issue_394 ():
2644 "https://github.com/JuliaPy/PythonCall.jl/issues/394"
2745 from juliacall import Main as jl
You can’t perform that action at this time.
0 commit comments