7 class UnorderedListTests(unittest.TestCase):
9 self.inputpath = os.path.sep.join(os.path.dirname(os.path.realpath(__file__)).split(os.path.sep)[0:-1])
11 def testwellformedlist(self):
13 from rss2maildir import HTML2Text
15 sys.path.append(os.path.sep.join(self.inputpath.split(os.path.sep)[0:-1]))
17 from rss2maildir import HTML2Text
20 input_path = os.path.sep.join(os.path.dirname(os.path.realpath(__file__)).split(os.path.sep)[0:-1])
21 input = open(os.path.join(input_path, "html", "unorderedlist-wellformed.html")).read()
22 expectedoutput = open(os.path.join(input_path, "expected", "unorderedlist-wellformed.txt")).read()
25 output = parser.gettext()
26 self.assertEqual(output, expectedoutput)
28 def testbadlyformed(self):
30 from rss2maildir import HTML2Text
32 sys.path.append(os.path.sep.join(self.inputpath.split(os.path.sep)[0:-1]))
34 from rss2maildir import HTML2Text
38 input_path = os.path.sep.join(os.path.dirname(os.path.realpath(__file__)).split(os.path.sep)[0:-1])
39 input = open(os.path.join(input_path, "html", "unorderedlist-badlyformed.html")).read()
40 expectedoutput = open(os.path.join(input_path, "expected", "unorderedlist-badlyformed.txt")).read()
43 output = parser.gettext()
44 self.assertEqual(output, expectedoutput)
46 if __name__ == "__main__":