def test_String2Longer(self):
     expRes = "Strings both have 1 lines\n"
     expRes += "Mismatched line numbers: [1]\n"
     expRes += "str1-----\n"
     expRes += "*001: A:\n"
     expRes += "\n"
     expRes += "str2-----\n"
     expRes += "*001: Bbbbbb:\n"
     expRes += "\n"
     self.assertEqual(
         undertest.areMultiLinesStringsEqual("A", "Bbbbbb", str1Name,
                                             str2Name), expRes)
 def test_diffMiddleLineOf3(self):
     expRes = "Strings both have 3 lines\n"
     expRes += "Mismatched line numbers: [2]\n"
     expRes += "str1-----\n"
     expRes += " 001: A:\n"
     expRes += "*002: x:\n"
     expRes += " 003: B:\n"
     expRes += "\n"
     expRes += "str2-----\n"
     expRes += " 001: A:\n"
     expRes += "*002: y:\n"
     expRes += " 003: B:\n"
     expRes += "\n"
     self.assertEqual(
         undertest.areMultiLinesStringsEqual("A\nx\nB", "A\ny\nB", str1Name,
                                             str2Name), expRes)
 def test_String2None(self):
     expRes = "str1 lines:4\n"
     expRes += "str2 lines:None\n"
     expRes += "Mismatched line numbers: [ ALL ]\n"
     expRes += "str1-----\n"
     expRes += "*001: A:\n"
     expRes += "*002: A:\n"
     expRes += "*003: A:\n"
     expRes += "*004: A:\n"
     expRes += "\n"
     expRes += "str2-----\n"
     expRes += " ** NONE **\n"
     expRes += "\n"
     self.assertEqual(
         undertest.areMultiLinesStringsEqual("A\nA\nA\nA", None, str1Name,
                                             str2Name), expRes)
 def test_String1MoreLines(self):
     expRes = "str1 lines:4\n"
     expRes += "str2 lines:3\n"
     expRes += "Mismatched line numbers: [3, 4]\n"
     expRes += "str1-----\n"
     expRes += " 001: A:\n"
     expRes += " 002: A:\n"
     expRes += "*003: A:\n"
     expRes += "*004: A:\n"
     expRes += "\n"
     expRes += "str2-----\n"
     expRes += " 001: A:\n"
     expRes += " 002: A:\n"
     expRes += "*003: :\n"
     expRes += "\n"
     self.assertEqual(
         undertest.areMultiLinesStringsEqual("A\nA\nA\nA", "A\nA\n",
                                             str1Name, str2Name), expRes)
 def test_emptyStrings(self):
     self.assertEqual(
         undertest.areMultiLinesStringsEqual("", "", str1Name, str2Name),
         None)
 def test_passNone(self):
     self.assertEqual(
         undertest.areMultiLinesStringsEqual(None, None, str1Name,
                                             str2Name), None)