diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:24:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:24:24 +0000 |
commit | 12e8343068b906f8b2afddc5569968a8a91fa5b0 (patch) | |
tree | 75cc5e05a4392ea0292251898f992a15a16b172b /benchmarking/bench_core.py | |
parent | Initial commit. (diff) | |
download | markdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.tar.xz markdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.zip |
Adding upstream version 2.1.0.upstream/2.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | benchmarking/bench_core.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarking/bench_core.py b/benchmarking/bench_core.py new file mode 100644 index 0000000..6834989 --- /dev/null +++ b/benchmarking/bench_core.py @@ -0,0 +1,20 @@ +from pathlib import Path + +import pytest + +import markdown_it + + +@pytest.fixture +def spec_text(): + return Path(__file__).parent.joinpath("samples", "spec.md").read_text() + + +@pytest.fixture +def parser(): + return markdown_it.MarkdownIt("commonmark") + + +@pytest.mark.benchmark(group="core") +def test_spec(benchmark, parser, spec_text): + benchmark(parser.render, spec_text) |