diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-07-28 13:43:39 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-07-28 13:43:39 -0400 |
commit | 245d40e4114708c6a3aad65f91103ed34739bbd1 (patch) | |
tree | 36513f2f273a4a7421a6631f9c9301d6e1273132 /tests/test_apis.py | |
parent | efa3e93ea7f222bc122866ad423053d540382c76 (diff) | |
download | markdown-245d40e4114708c6a3aad65f91103ed34739bbd1.tar.gz markdown-245d40e4114708c6a3aad65f91103ed34739bbd1.tar.bz2 markdown-245d40e4114708c6a3aad65f91103ed34739bbd1.zip |
TestCase.assert_ and TestCase.failUnless are depreciated in Python 3 in favor of testCase.assertTrue. Might as well be using the right method in our tests.
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r-- | tests/test_apis.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py index d34f2c0..0943b92 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -53,8 +53,8 @@ class TestBlockParser(unittest.TestCase): """ Test BlockParser.parseDocument. """ lines = ['#foo', '', 'bar', '', ' baz'] tree = self.parser.parseDocument(lines) - self.assert_(isinstance(tree, markdown.util.etree.ElementTree)) - self.assert_(markdown.util.etree.iselement(tree.getroot())) + self.assertTrue(isinstance(tree, markdown.util.etree.ElementTree)) + self.assertTrue(markdown.util.etree.iselement(tree.getroot())) self.assertEqual(markdown.searializers.to_xhtml_string(tree.getroot()), "<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>") @@ -295,7 +295,7 @@ class testETreeComments(unittest.TestCase): def testCommentIsComment(self): """ Test that an ElementTree Comment passes the `is Comment` test. """ - self.assert_(self.comment.tag is markdown.util.etree.test_comment) + self.assertTrue(self.comment.tag is markdown.util.etree.test_comment) def testCommentIsBlockLevel(self): """ Test that an ElementTree Comment is recognized as BlockLevel. """ |