mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-14 19:00:38 -05:00
Better test support for Python Plugins (#1108)
* add plugins testing utils module * add plugins manager fixture and init plugins tests helper in conftest * add _custom_elements attribute to pyscript.Plugin to allow plugins to track the CE they register * add test for py_tutor * remove unrelated code from prims js script * ensure a Plugin always has the app attribute and improve tests * add tests for py_tutor create_code_section * implement PluginsManager reset and add teardown on plugins_manager fixture to clean it up after a test * add test to check if plugin has been registered * add docstrings to new tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add docstrings to plugins tester * add changes from main * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * lint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add todo to add remaining PluginsManager lifecycle events Co-authored-by: Fabio Pliger <fpliger@anaconda.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -90,10 +90,6 @@ class PyTutor:
|
||||
# Add the JS file
|
||||
script = js.document.createElement("script")
|
||||
script.type = "text/javascript"
|
||||
try:
|
||||
script.appendChild(js.document.createTextNode(PAGE_SCRIPT))
|
||||
except BaseException:
|
||||
script.text = PAGE_SCRIPT
|
||||
script.src = "./assets/prism/prism.js"
|
||||
js.document.head.appendChild(script)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user