Jan-04-2018, 10:28 PM
(This post was last modified: Jan-04-2018, 10:28 PM by Gribouillis.)
Here is the starting point of a testing file, assuming the initial file is
tagfoo.py
# file testtagfoo.py import unittest as ut from tagfoo import tagify, tag class TestTagify(ut.TestCase): def test_simple_image_tag(self): rv = tagify('image', 'An Image', src='filename.jpg') self.assertEqual( rv, '<image src="filename.jpg">An Image</image>') if __name__ == '__main__': ut.main()You can add methods
test_...
to the TestTagify
class, and create new classes.