From 245d40e4114708c6a3aad65f91103ed34739bbd1 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 28 Jul 2011 13:43:39 -0400 Subject: 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. --- tests/test_apis.py | 6 +++--- 1 file 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()), "

foo

bar

baz\n
") @@ -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. """ -- cgit v1.2.3