Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Duktape coroutines #7

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
491 changes: 259 additions & 232 deletions pyduktape.pyx

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@
extensions = [
Extension(
'pyduktape',
['pyduktape.pyx'],
define_macros=[
('DUK_OPT_DEBUGGER_SUPPORT', '1'),
('DUK_OPT_INTERRUPT_COUNTER', '1'),
],
['pyduktape.pyx']
)
]

setup(
name='pyduktape',
version='0.0.6',
version='0.2.1',
author='Stefano Dissegna',
description='Python integration for the Duktape Javascript interpreter',
long_description=long_description,
Expand Down
18 changes: 0 additions & 18 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,6 @@ def run():

self.assertTrue(ok[0])

def test_cant_call_from_different_thread(self):
ctx = DuktapeContext()
proxy = ctx.eval_js('[1, 2]')

ok = [False]

def run():
try:
proxy[0]
except DuktapeThreadError:
ok[0] = True

thread = Thread(target=run)
thread.start()
thread.join()

self.assertTrue(ok[0])

def test_raise_js_error(self):
ctx = DuktapeContext()

Expand Down
Loading