mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Fix py-markdown plugin (#1008)
* fix wrong console method and unescape the tag content before running markdown on it * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add markdown plugin example test * add PyMarkdown minimal test * remove commented code * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove import of console from pyscript * remove unused imports * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabio Pliger <fpliger@anaconda.com>
This commit is contained in:
@@ -176,6 +176,17 @@ class TestExamples(PyScriptTest):
|
||||
zoom_out.click()
|
||||
self.assert_no_banners()
|
||||
|
||||
def test_markdown_plugin(self):
|
||||
# Given the example page with:
|
||||
# * <title>PyMarkdown</title>
|
||||
# * <py-md>#Hello world!</py-md>
|
||||
self.goto("examples/markdown-plugin.html")
|
||||
self.wait_for_pyscript()
|
||||
# ASSERT title is rendered correctly
|
||||
assert self.page.title() == "PyMarkdown"
|
||||
# ASSERT markdown is rendered to the corresponding HTML tag
|
||||
wait_for_render(self.page, "*", "<h1>Hello world!</h1>")
|
||||
|
||||
def test_matplotlib(self):
|
||||
self.goto("examples/matplotlib.html")
|
||||
self.wait_for_pyscript()
|
||||
|
||||
Reference in New Issue
Block a user