aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-09-20 15:29:03 -0400
committerWaylan Limberg <waylan@gmail.com>2010-09-20 15:29:03 -0400
commite2a79787f426bef4c2455d235252362586838773 (patch)
tree86a0daa8424c5527e726cf58045f8ae3bd51e156 /tests
parentaf98c981e8540809938952ee549baf65bb951116 (diff)
parent5366b6908de0daa389ac514eb92c8db3e04148db (diff)
downloadmarkdown-e2a79787f426bef4c2455d235252362586838773.tar.gz
markdown-e2a79787f426bef4c2455d235252362586838773.tar.bz2
markdown-e2a79787f426bef4c2455d235252362586838773.zip
Merge branch 'master' of git@gitorious.org:python-markdown/mainline
Diffstat (limited to 'tests')
-rw-r--r--tests/misc/block_html_attr.html27
-rw-r--r--tests/misc/block_html_attr.txt24
-rw-r--r--tests/misc/block_html_simple.html10
-rw-r--r--tests/misc/block_html_simple.txt9
-rw-r--r--tests/test_apis.py4
5 files changed, 72 insertions, 2 deletions
diff --git a/tests/misc/block_html_attr.html b/tests/misc/block_html_attr.html
new file mode 100644
index 0000000..d1c9efc
--- /dev/null
+++ b/tests/misc/block_html_attr.html
@@ -0,0 +1,27 @@
+<blockquote>
+Raw HTML processing should not confuse this with the blockquote below
+</blockquote>
+
+<div id="current-content">
+ <div id="primarycontent" class="hfeed">
+ <div id="post-">
+ <div class="page-head">
+ <h2>Header2</h2>
+ </div>
+ <div class="entry-content">
+ <h3>Header3</h3>
+ <p>Paragraph</p>
+ <h3>Header3</h3>
+ <p>Paragraph</p>
+ <blockquote>
+ <p>Paragraph</p>
+ </blockquote>
+ <p>Paragraph</p>
+ <p><a href="/somelink">linktext</a></p>
+ </div>
+ </div><!-- #post-ID -->
+ <!-- add contact form here -->
+ </div><!-- #primarycontent -->
+</div>
+
+<!-- #current-content --> \ No newline at end of file
diff --git a/tests/misc/block_html_attr.txt b/tests/misc/block_html_attr.txt
new file mode 100644
index 0000000..b2603cc
--- /dev/null
+++ b/tests/misc/block_html_attr.txt
@@ -0,0 +1,24 @@
+<blockquote>
+Raw HTML processing should not confuse this with the blockquote below
+</blockquote>
+<div id="current-content">
+ <div id="primarycontent" class="hfeed">
+ <div id="post-">
+ <div class="page-head">
+ <h2>Header2</h2>
+ </div>
+ <div class="entry-content">
+ <h3>Header3</h3>
+ <p>Paragraph</p>
+ <h3>Header3</h3>
+ <p>Paragraph</p>
+ <blockquote>
+ <p>Paragraph</p>
+ </blockquote>
+ <p>Paragraph</p>
+ <p><a href="/somelink">linktext</a></p>
+ </div>
+ </div><!-- #post-ID -->
+ <!-- add contact form here -->
+ </div><!-- #primarycontent -->
+</div><!-- #current-content -->
diff --git a/tests/misc/block_html_simple.html b/tests/misc/block_html_simple.html
new file mode 100644
index 0000000..dce68bc
--- /dev/null
+++ b/tests/misc/block_html_simple.html
@@ -0,0 +1,10 @@
+<p>foo</p>
+
+<ul>
+<li>
+<p>bar</p>
+</li>
+<li>
+<p>baz</p>
+</li>
+</ul> \ No newline at end of file
diff --git a/tests/misc/block_html_simple.txt b/tests/misc/block_html_simple.txt
new file mode 100644
index 0000000..d108c50
--- /dev/null
+++ b/tests/misc/block_html_simple.txt
@@ -0,0 +1,9 @@
+<p>foo</p>
+<ul>
+<li>
+<p>bar</p>
+</li>
+<li>
+<p>baz</p>
+</li>
+</ul>
diff --git a/tests/test_apis.py b/tests/test_apis.py
index e420c2a..51f4e73 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -249,13 +249,13 @@ class TestErrors(unittest.TestCase):
def testLoadExtensionFailure(self):
""" Test failure of an extension to load. """
self.assertRaises(MarkdownWarning,
- markdown.extensions.load_extension, 'non_existant_ext')
+ markdown.Markdown, extensions=['non_existant_ext'])
def testLoadBadExtension(self):
""" Test loading of an Extension with no makeExtension function. """
_create_fake_extension(name='fake', has_factory_func=False)
self.assertRaises(MarkdownException,
- markdown.extensions.load_extension, 'fake')
+ markdown.Markdown, extensions=['fake'])
def testNonExtension(self):
""" Test loading a non Extension object as an extension. """