Skip to content

Commit

Permalink
add test for issue #394
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Doris committed Oct 31, 2023
1 parent 8495784 commit 4018135
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pytest/test_all.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
def test_import():
import juliacall

def test_issue_394():
"https://github.com/JuliaPy/PythonCall.jl/issues/394"
from juliacall import Main as jl
x = 3
f = lambda x: x+1
y = 5
jl.x = f
assert jl.x is x
jl.f = f
assert jl.f is f
jl.y = y
assert jl.y is y
assert jl.x is x
assert jl.f is f
assert jl.y is y
assert jl.seval("f(x)") == 4

0 comments on commit 4018135

Please sign in to comment.