Skip to content

Commit 6ba8440

Browse files
author
hartsantler
committed
fixed unit tests: call-python-callback-from-js
1 parent b872956 commit 6ba8440

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/call-python-callback-from-js.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
<script type="text/python" closure="false">
66

77
with javascript:
8-
#JS('var call_callback = function(callback) {') ## this workaround is no longer required
9-
#callback(1,2,3)
10-
#JS('}')
118

129
def call_callback( pyfunc ):
13-
print 'func', pyfunc
14-
pyfunc( 1,2,3 )
10+
#pyfunc( 1,2,3 ) ## this is not correct
11+
#pyfunc( [1,2,3] ) ## this works but is not clear we are dealing with a pythonjs function
12+
with python:
13+
pyfunc( 1,2,3 )
1514

1615
def callback(foo, bar, baz):
1716
print foo

unittests/0006-call-python-callback-from-js.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
with javascript:
22
def call_callback(callback):
3-
callback(1,2,3)
3+
with python:
4+
callback(1,2,3)
45

56

67
def callback(foo, bar, baz):

0 commit comments

Comments
 (0)