@@ -1132,6 +1132,8 @@ def testAssertMultiLineEqual(self):
1132
1132
# need to remove the first line of the error message
1133
1133
error = str (e ).split ('\n ' , 1 )[1 ]
1134
1134
self .assertEqual (sample_text_error , error )
1135
+ else :
1136
+ self .fail (f'{ self .failureException } not raised' )
1135
1137
1136
1138
def testAssertEqualSingleLine (self ):
1137
1139
sample_text = "laden swallows fly slowly"
@@ -1148,6 +1150,8 @@ def testAssertEqualSingleLine(self):
1148
1150
# need to remove the first line of the error message
1149
1151
error = str (e ).split ('\n ' , 1 )[1 ]
1150
1152
self .assertEqual (sample_text_error , error )
1153
+ else :
1154
+ self .fail (f'{ self .failureException } not raised' )
1151
1155
1152
1156
def testAssertEqualwithEmptyString (self ):
1153
1157
'''Verify when there is an empty string involved, the diff output
@@ -1165,6 +1169,8 @@ def testAssertEqualwithEmptyString(self):
1165
1169
# need to remove the first line of the error message
1166
1170
error = str (e ).split ('\n ' , 1 )[1 ]
1167
1171
self .assertEqual (sample_text_error , error )
1172
+ else :
1173
+ self .fail (f'{ self .failureException } not raised' )
1168
1174
1169
1175
def testAssertEqualMultipleLinesMissingNewlineTerminator (self ):
1170
1176
'''Verifying format of diff output from assertEqual involving strings
@@ -1185,6 +1191,8 @@ def testAssertEqualMultipleLinesMissingNewlineTerminator(self):
1185
1191
# need to remove the first line of the error message
1186
1192
error = str (e ).split ('\n ' , 1 )[1 ]
1187
1193
self .assertEqual (sample_text_error , error )
1194
+ else :
1195
+ self .fail (f'{ self .failureException } not raised' )
1188
1196
1189
1197
def testAssertEqualMultipleLinesMismatchedNewlinesTerminators (self ):
1190
1198
'''Verifying format of diff output from assertEqual involving strings
@@ -1208,6 +1216,8 @@ def testAssertEqualMultipleLinesMismatchedNewlinesTerminators(self):
1208
1216
# need to remove the first line of the error message
1209
1217
error = str (e ).split ('\n ' , 1 )[1 ]
1210
1218
self .assertEqual (sample_text_error , error )
1219
+ else :
1220
+ self .fail (f'{ self .failureException } not raised' )
1211
1221
1212
1222
def testEqualityBytesWarning (self ):
1213
1223
if sys .flags .bytes_warning :
0 commit comments