Skip to content

Commit 4018135

Browse files
author
Christopher Doris
committed
add test for issue #394
1 parent 8495784 commit 4018135

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pytest/test_all.py

+17
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
def test_import():
22
import juliacall
3+
4+
def test_issue_394():
5+
"https://github.com/JuliaPy/PythonCall.jl/issues/394"
6+
from juliacall import Main as jl
7+
x = 3
8+
f = lambda x: x+1
9+
y = 5
10+
jl.x = f
11+
assert jl.x is x
12+
jl.f = f
13+
assert jl.f is f
14+
jl.y = y
15+
assert jl.y is y
16+
assert jl.x is x
17+
assert jl.f is f
18+
assert jl.y is y
19+
assert jl.seval("f(x)") == 4

0 commit comments

Comments
 (0)