<commit_before>import re

def test_emails_on_home_page(app):
    email_from_home_page = app.contact.get_contact_list()[0]
    email_from_edit_page = app.contact.get_email_info_from_edit_page(0)
    assert email_from_home_page.all_emails_from_home_page == merge_phones_like_on_home_page(email_from_edit_page)
    

def clear(s):
    return re.sub("[() -]", "", s)

def merge_phones_like_on_home_page(contact):
   return "\n".join(filter(lambda x: x!= "",
                              map(lambda x: clear(x),
                                  filter(lambda x: x is not None,
                                         [contact.email, contact.email2, contact.email3]))))<commit_msg>add tests for comparsion of emails, address and phones<commit_after>import re

def test_emails_on_home_page(app):
    email_from_home_page = app.contact.get_contact_list()[0]
    email_from_edit_page = app.contact.get_email_info_from_edit_page(0)
    assert email_from_home_page.all_emails_from_home_page == merge_phones_like_on_home_page(email_from_edit_page)
    

def clear(s):
    return re.sub("[() -]", "", s)

def merge_phones_like_on_home_page(contact):
   return "\n".join(filter(lambda x: x!= "",
                              map(lambda x: clear(x),
                                  filter(lambda x: x is not None,
                                         [contact.email, contact.email2, contact.email3]))))

{'fraction_non_alphanumeric': 0.10658082975679542, 'fraction_numerical': 0.005722460658082976, 'mean_word_length': 2.720744680851064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1317089', 'n_tokens_mistral': 445, 'n_tokens_neox': 444, 'n_words': 75}