@@ -1132,6 +1132,8 @@ def testAssertMultiLineEqual(self):
11321132 # need to remove the first line of the error message
11331133 error = str (e ).split ('\n ' , 1 )[1 ]
11341134 self .assertEqual (sample_text_error , error )
1135+ else :
1136+ self .fail (f'{ self .failureException } not raised' )
11351137
11361138 def testAssertEqualSingleLine (self ):
11371139 sample_text = "laden swallows fly slowly"
@@ -1148,6 +1150,8 @@ def testAssertEqualSingleLine(self):
11481150 # need to remove the first line of the error message
11491151 error = str (e ).split ('\n ' , 1 )[1 ]
11501152 self .assertEqual (sample_text_error , error )
1153+ else :
1154+ self .fail (f'{ self .failureException } not raised' )
11511155
11521156 def testAssertEqualwithEmptyString (self ):
11531157 '''Verify when there is an empty string involved, the diff output
@@ -1165,6 +1169,8 @@ def testAssertEqualwithEmptyString(self):
11651169 # need to remove the first line of the error message
11661170 error = str (e ).split ('\n ' , 1 )[1 ]
11671171 self .assertEqual (sample_text_error , error )
1172+ else :
1173+ self .fail (f'{ self .failureException } not raised' )
11681174
11691175 def testAssertEqualMultipleLinesMissingNewlineTerminator (self ):
11701176 '''Verifying format of diff output from assertEqual involving strings
@@ -1185,6 +1191,8 @@ def testAssertEqualMultipleLinesMissingNewlineTerminator(self):
11851191 # need to remove the first line of the error message
11861192 error = str (e ).split ('\n ' , 1 )[1 ]
11871193 self .assertEqual (sample_text_error , error )
1194+ else :
1195+ self .fail (f'{ self .failureException } not raised' )
11881196
11891197 def testAssertEqualMultipleLinesMismatchedNewlinesTerminators (self ):
11901198 '''Verifying format of diff output from assertEqual involving strings
@@ -1208,6 +1216,8 @@ def testAssertEqualMultipleLinesMismatchedNewlinesTerminators(self):
12081216 # need to remove the first line of the error message
12091217 error = str (e ).split ('\n ' , 1 )[1 ]
12101218 self .assertEqual (sample_text_error , error )
1219+ else :
1220+ self .fail (f'{ self .failureException } not raised' )
12111221
12121222 def testEqualityBytesWarning (self ):
12131223 if sys .flags .bytes_warning :
0 commit comments