diff --git a/.circleci/config.yml b/.circleci/config.yml index e0b7835..79e231d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,9 @@ jobs: pkg-manager: pip - run: name: Run Python unit tests - command: python3 hugo_test.py + command: + python3 common_test.py + python3 hugo_test.py workflows: publish: diff --git a/common_test.py b/common_test.py new file mode 100644 index 0000000..c540dbd --- /dev/null +++ b/common_test.py @@ -0,0 +1,31 @@ +import unittest +from common import html2text + +html = """ + + + +
This is my body
+ + +""" + +text = """ + + + +This is my body + + +""" + + + +class TestHTML2Text(unittest.TestCase): + + def test1(self): + mytext = html2text(html) + self.assertEqual(text, mytext) + +if __name__ == '__main__': + unittest.main()