mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
18 lines
568 B
Python
18 lines
568 B
Python
from unittest.mock import Mock
|
|
|
|
import py_markdown
|
|
|
|
|
|
class TestPyMarkdown:
|
|
def test_plugin_hooks(self, monkeypatch):
|
|
console_mock = Mock()
|
|
monkeypatch.setattr(py_markdown, "console", console_mock)
|
|
config = "just a config"
|
|
interpreter = "just an interpreter"
|
|
|
|
py_markdown.plugin.configure(config)
|
|
console_mock.log.assert_called_with("configuration received: just a config")
|
|
|
|
py_markdown.plugin.afterStartup(interpreter)
|
|
console_mock.log.assert_called_with("interpreter received: just an interpreter")
|