Coverage for tests/test_tree.py: 100.00%

5 statements  

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

1"""Tests for the shell formatters.""" 

2 

3from textwrap import dedent 

4 

5from markdown import Markdown 

6 

7 

8def test_output_markdown(md: Markdown) -> None: 

9 """Assert we can highlight lines in the output. 

10 

11 Parameters: 

12 md: A Markdown instance (fixture). 

13 """ 

14 html = md.convert( 

15 dedent( 

16 """ 

17 ```tree hl_lines="2" 

18 1 

19 2 

20 3 

21 ``` 

22 """, 

23 ), 

24 ) 

25 assert '<span class="hll">' in html