Passed
Push — develop ( bcdb14...7e0539 )
by Christophe
01:15
created

tests.test_headers   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 10
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A HeadersTest.test_headers() 0 15 1
1
from unittest import TestCase
2
3
from panflute import Doc, convert_text
4
5
import pandoc_numbering
6
7
8
class HeadersTest(TestCase):
9
    def test_headers(self):
10
        markdown = r"""
11
# Title 1
12
13
## Subtitle1
14
15
# Title 2
16
17
## Subtitle 2
18
19
# Title 3 {.unnumbered}
20
        """
21
        doc = Doc(*convert_text(markdown))
22
        pandoc_numbering.main(doc)
23
        self.assertEqual(doc.headers, [2, 1, 0, 0, 0, 0])
24