#NEWLINE# def test_invalid( self ) : #NEWLINE# #INDENT# invalid_emails = [ '.start@dot.com' , 'end.@dot.com' , 'double..dot@dot.com' , 'local@.start.com' , 'local@end.' , 'local@double..dot.com' , '@no.local' , 'no.domain@' , 'notanemail' ] #NEWLINE# for email in invalid_emails : #NEWLINE# #INDENT# self . assertEqual ( self . validator ( email ) , "'{email}' is not a valid email address" . format ( email = email ) )