import unittest from smiley import smiley_count class MyTestCase(unittest.TestCase): def test_smiley(self): self.assertEqual(smiley_count('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus convallis.'), 0) self.assertEqual(smiley_count('Lorem ipsum dolor sit amet =-0, consectetur adipiscing elit =-0. Phasellus convallis. =-0'), 3) self.assertEqual(smiley_count('Lorem ipsum dolor sit amet =- 0, consectetur adipiscing elit =\n-0. Phasellus convallis.\n=-0'), 1) self.assertEqual(smiley_count(''), 0) self.assertEqual(smiley_count('=-0=-0=-0=--=0-=-009=-'), 4) if __name__ == '__main__': unittest.main()