import unittest class AssertEqualTest(unittest.TestCase): def test_trailingnewline_0(self): self.assertEqual("abcDefehiJkl\n", "abcdefGhijkl\n") def test_notrailingnewline_0(self): self.assertEqual("abcDefehiJkl", "abcdefGhijkl") def test_startingnewline_0(self): self.assertEqual("\nabcDefehiJkl", "\nabcdefGhijkl") def test_starting_and_ending_newline_0(self): self.assertEqual("\nabcDefehiJkl\n", "\nabcdefGhijkl\n") def test_notrailingnewline_1(self): self.assertEqual("a\nbcdf", "a\nbddf") def test_trailingnewline_1(self): self.assertEqual("a\nbcdf\n", "a\nbddf\n") def test_notrailingnewline_2(self): self.assertEqual("a\nbcdf", "a\nbddg") def test_trailingnewline_2(self): self.assertEqual("a\nbcdf\n", "a\nbddg\n") if __name__ =='__main__': unittest.main()