<commit_before>import app.change_mac_address as c


def test_dec_to_hex():
    assert c.dec_to_hex(0) == '0'
    assert c.dec_to_hex(1) == '1'
    assert c.dec_to_hex(3) == '3'
    assert c.dec_to_hex(10) == 'a'
    assert c.dec_to_hex(11) == 'b'
    assert c.dec_to_hex(12) == 'c'
    assert c.dec_to_hex(15) == 'f'

<commit_msg>Add tests<commit_after>import re
import app.change_mac_address as c


def test_dec_to_hex():
    assert c.dec_to_hex(0) == '0'
    assert c.dec_to_hex(1) == '1'
    assert c.dec_to_hex(3) == '3'
    assert c.dec_to_hex(10) == 'a'
    assert c.dec_to_hex(11) == 'b'
    assert c.dec_to_hex(12) == 'c'
    assert c.dec_to_hex(15) == 'f'

def test_get_hex_pair():
    """Checks that it only returns valid hex digits."""
    pattern = re.compile('([a-f]|\d)')
    hex_pair = c.get_hex_pair()

    assert len(hex_pair) == 2
    for hex_digit in hex_pair:
        assert pattern.match(hex_digit) is not None



{'fraction_non_alphanumeric': 0.15738758029978586, 'fraction_numerical': 0.031049250535331904, 'mean_word_length': 3.3287037037037037, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5193766', 'n_tokens_mistral': 412, 'n_tokens_neox': 394, 'n_words': 83}