@step((CHECK_PREFIX + 'I have sent (\\d+) emails?'))
def mail_sent_count(step, count):
 count = int(count)
 assert (len(mail.outbox) == count), 'Length of outbox is {0}'.format(count)

@ step ( ( CHECK_PREFIX + 'I have sent (\\d+) emails?' ) ) def mail_sent_count ( step , count ) : count = int ( count ) assert ( len ( mail . outbox ) == count ) , 'Length of outbox is {0}' . format ( count )
then i have sent 2 emails .