blob: 6834989fe7d1079f18117c385a9dd79270fe9e2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
|