Files
pyscript/pyscriptjs/tests/py-unit/js.py
Hood Chatham c886f887ae Split pyscript into multiple files (#1338)
In the future this should help us leak fewer names into the pyscript
namespace.

Rather than assigning to the pyscript module from JavaScript, we
mount a separate private JS module with the extra names needed by
PyScript. I moved a bit more interpeter intialization into
remote_interpreter.

I added a deprecation warning for `pyscript.js`: the proper way to
access `js` is `import js`.

---------

Co-authored-by: Antonio Cuni <anto.cuni@gmail.com>
2023-04-12 14:49:47 +02:00

8 lines
196 B
Python

"""Mock module that emulates some of the pyodide js module features for the sake of tests"""
from unittest.mock import Mock
document = Mock()
console = Mock()
setTimeout = Mock()
Object = Mock()