Coverage for tests/conftest.py: 100.00%

7 statements  

« prev     ^ index     » next       coverage.py v7.2.3, created at 2023-04-16 20:19 +0200

1"""Configuration for the pytest test suite.""" 

2 

3import pytest 

4from markdown import Markdown 

5 

6from markdown_exec import formatter, formatters, validator 

7 

8 

9@pytest.fixture() 

10def md() -> Markdown: 

11 """Return a Markdown instance. 

12 

13 Returns: 

14 Markdown instance. 

15 """ 

16 fences = [ 

17 { 

18 "name": language, 

19 "class": language, 

20 "validator": validator, 

21 "format": formatter, 

22 } 

23 for language in formatters 

24 ] 

25 return Markdown( 

26 extensions=["pymdownx.superfences"], 

27 extension_configs={"pymdownx.superfences": {"custom_fences": fences}}, 

28 )