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():
22
22
juliacall .interactive (True )
23
23
juliacall .interactive (False )
24
24
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
+
25
43
def test_issue_394 ():
26
44
"https://github.com/JuliaPy/PythonCall.jl/issues/394"
27
45
from juliacall import Main as jl
You can’t perform that action at this time.
0 commit comments