@@ -1151,6 +1151,8 @@ def testAssertMultiLineEqual(self):
1151
1151
# need to remove the first line of the error message
1152
1152
error = str (e ).split ('\n ' , 1 )[1 ]
1153
1153
self .assertEqual (sample_text_error , error )
1154
+ else :
1155
+ self .fail (f'{ self .failureException } not raised' )
1154
1156
1155
1157
def testAssertEqualSingleLine (self ):
1156
1158
sample_text = "laden swallows fly slowly"
@@ -1167,6 +1169,8 @@ def testAssertEqualSingleLine(self):
1167
1169
# need to remove the first line of the error message
1168
1170
error = str (e ).split ('\n ' , 1 )[1 ]
1169
1171
self .assertEqual (sample_text_error , error )
1172
+ else :
1173
+ self .fail (f'{ self .failureException } not raised' )
1170
1174
1171
1175
def testAssertEqualwithEmptyString (self ):
1172
1176
'''Verify when there is an empty string involved, the diff output
@@ -1184,6 +1188,8 @@ def testAssertEqualwithEmptyString(self):
1184
1188
# need to remove the first line of the error message
1185
1189
error = str (e ).split ('\n ' , 1 )[1 ]
1186
1190
self .assertEqual (sample_text_error , error )
1191
+ else :
1192
+ self .fail (f'{ self .failureException } not raised' )
1187
1193
1188
1194
def testAssertEqualMultipleLinesMissingNewlineTerminator (self ):
1189
1195
'''Verifying format of diff output from assertEqual involving strings
@@ -1204,6 +1210,8 @@ def testAssertEqualMultipleLinesMissingNewlineTerminator(self):
1204
1210
# need to remove the first line of the error message
1205
1211
error = str (e ).split ('\n ' , 1 )[1 ]
1206
1212
self .assertEqual (sample_text_error , error )
1213
+ else :
1214
+ self .fail (f'{ self .failureException } not raised' )
1207
1215
1208
1216
def testAssertEqualMultipleLinesMismatchedNewlinesTerminators (self ):
1209
1217
'''Verifying format of diff output from assertEqual involving strings
@@ -1227,6 +1235,8 @@ def testAssertEqualMultipleLinesMismatchedNewlinesTerminators(self):
1227
1235
# need to remove the first line of the error message
1228
1236
error = str (e ).split ('\n ' , 1 )[1 ]
1229
1237
self .assertEqual (sample_text_error , error )
1238
+ else :
1239
+ self .fail (f'{ self .failureException } not raised' )
1230
1240
1231
1241
def testEqualityBytesWarning (self ):
1232
1242
if sys .flags .bytes_warning :
0 commit comments