From 5af09d2ba2911d96735dd613f04cb92c8c6c1924 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Mon, 7 Jan 2008 01:00:44 +0000 Subject: [PATCH] * unittest for mixture of different types of lists --- .../expected/mixednestedlists-wellformed.txt | 19 ++++++++++++++++ tests/html/mixednestedlists-wellformed.html | 22 +++++++++++++++++++ tests/unittests/NestedListTests.py | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 tests/expected/mixednestedlists-wellformed.txt create mode 100644 tests/html/mixednestedlists-wellformed.html diff --git a/tests/expected/mixednestedlists-wellformed.txt b/tests/expected/mixednestedlists-wellformed.txt new file mode 100644 index 0000000..86e83fc --- /dev/null +++ b/tests/expected/mixednestedlists-wellformed.txt @@ -0,0 +1,19 @@ + * Fun is on the way + 1. Honest + 2. It really is + * And it's fun + * We should have at least one silly long line to check that + wrapping works like we expect otherwise what's the point + + What is HTML2Text?:: + + HTML2Text is a funky bit of python that translates HTML fragments + in to plain text in a human readable format. It's primary use was + for generating the plain text body of email messages generated from + rssfeeds as part of rss2maildir. + + Hopefully one day it'll be good enough that other people will want + to use it! + + Who wrote it?:: + HTML2Text was written by Brett Parker. diff --git a/tests/html/mixednestedlists-wellformed.html b/tests/html/mixednestedlists-wellformed.html new file mode 100644 index 0000000..d862fc5 --- /dev/null +++ b/tests/html/mixednestedlists-wellformed.html @@ -0,0 +1,22 @@ + diff --git a/tests/unittests/NestedListTests.py b/tests/unittests/NestedListTests.py index 1e4ccf5..22540df 100755 --- a/tests/unittests/NestedListTests.py +++ b/tests/unittests/NestedListTests.py @@ -13,10 +13,14 @@ class NestedListTests(ParsingTests.ParsingTest): def testWellFormedNestedOrderedLists(self): return self.runParsingTest("nestedorderedlists-wellformed") + def testWellFormedMixedNestedLists(self): + return self.runParsingTest("mixednestedlists-wellformed") + def suite(): suite = unittest.TestSuite() suite.addTest(NestedListTests("testWellFormedNestedLists")) suite.addTest(NestedListTests("testWellFormedNestedOrderedLists")) + suite.addTest(NestedListTests("testWellFormedMixedNestedLists")) return suite if __name__ == "__main__": -- 2.39.5