@@ -1151,6 +1151,8 @@ def testAssertMultiLineEqual(self):
11511151 # need to remove the first line of the error message
11521152 error = str (e ).split ('\n ' , 1 )[1 ]
11531153 self .assertEqual (sample_text_error , error )
1154+ else :
1155+ self .fail (f'{ self .failureException } not raised' )
11541156
11551157 def testAssertEqualSingleLine (self ):
11561158 sample_text = "laden swallows fly slowly"
@@ -1167,6 +1169,8 @@ def testAssertEqualSingleLine(self):
11671169 # need to remove the first line of the error message
11681170 error = str (e ).split ('\n ' , 1 )[1 ]
11691171 self .assertEqual (sample_text_error , error )
1172+ else :
1173+ self .fail (f'{ self .failureException } not raised' )
11701174
11711175 def testAssertEqualwithEmptyString (self ):
11721176 '''Verify when there is an empty string involved, the diff output
@@ -1184,6 +1188,8 @@ def testAssertEqualwithEmptyString(self):
11841188 # need to remove the first line of the error message
11851189 error = str (e ).split ('\n ' , 1 )[1 ]
11861190 self .assertEqual (sample_text_error , error )
1191+ else :
1192+ self .fail (f'{ self .failureException } not raised' )
11871193
11881194 def testAssertEqualMultipleLinesMissingNewlineTerminator (self ):
11891195 '''Verifying format of diff output from assertEqual involving strings
@@ -1204,6 +1210,8 @@ def testAssertEqualMultipleLinesMissingNewlineTerminator(self):
12041210 # need to remove the first line of the error message
12051211 error = str (e ).split ('\n ' , 1 )[1 ]
12061212 self .assertEqual (sample_text_error , error )
1213+ else :
1214+ self .fail (f'{ self .failureException } not raised' )
12071215
12081216 def testAssertEqualMultipleLinesMismatchedNewlinesTerminators (self ):
12091217 '''Verifying format of diff output from assertEqual involving strings
@@ -1227,6 +1235,8 @@ def testAssertEqualMultipleLinesMismatchedNewlinesTerminators(self):
12271235 # need to remove the first line of the error message
12281236 error = str (e ).split ('\n ' , 1 )[1 ]
12291237 self .assertEqual (sample_text_error , error )
1238+ else :
1239+ self .fail (f'{ self .failureException } not raised' )
12301240
12311241 def testEqualityBytesWarning (self ):
12321242 if sys .flags .bytes_warning :
0 commit comments