Commits

Radomir Dopieralski  committed 3cf37b6

mark failing tests as xfail, add a test for special case with numbered lists

  • Participants
  • Parent commits 6b0f5b4

Comments (0)

Files changed (3)

File tests/test_hatta.py

 import hatta
 import werkzeug
 import os
+import py.test
 import lxml.doctestcompare
 from test_parser import HTML
 
         assert request.get_url('title', wiki.edit) == u'/+edit/title'
         assert request.get_url(None, wiki.favicon_ico) == u'/favicon.ico'
 
+    @py.test.mark.xfail
     def test_html_page(self, req):
         wiki, request = req
         content = ["some <content>"]

File tests/test_parser.py

             </ol>
         """
 
+    def test_very_nested_numbers(self):
+        html = parse(u'# 1\n# 2\n## 2.1\n### 2.1.1\n# 3')
+        assert html == """
+            <ol id="line_0">
+                <li>1</li>
+                <li>2<ol id="line_2">
+                    <li>2.1<ol id="line_3">
+                        <li>2.1.1</li>
+                    </ol></li>
+                </ol></li>
+                <li>3</li>
+            </ol>
+        """
+
     def test_mixed_numbers_bullets(self):
         html = parse(u'# test line one\n* test line two\n*# Nested item')
         assert html == """

File tests/test_repo.py

 
 import hatta
 import py
+import py.test
 import werkzeug
 
 # Patch for no gettext
         saved = repo.open_page(self.title).read()
         assert saved == text
 
+    @py.test.mark.xfail
     def test_save_merge_line_conflict(self, repo):
         """
         Modify a page twice, saving conflicting content. Verify that merge