We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f1f9f4 commit 8021e5aCopy full SHA for 8021e5a
pytest/test_all.py
@@ -22,6 +22,24 @@ def test_interactive():
22
juliacall.interactive(True)
23
juliacall.interactive(False)
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
+
43
def test_issue_394():
44
"https://github.com/JuliaPy/PythonCall.jl/issues/394"
45
from juliacall import Main as jl
0 commit comments