<commit_before>import sys
sys.path.append('../py-hdlc')
import pytest
from hdlc import HDLCBaseFrame


def test_plain_init():
    foo = HDLCBaseFrame()


def test_parse_address_string_input(baseframe):
    with pytest.raises(TypeError):
        baseframe.parse_address('test')


def test_parse_address_float_input(baseframe):
    with pytest.raises(TypeError):
        baseframe.parse_address(2.3)


def test_parse_address_bytearray_input(baseframe):
    with pytest.raises(TypeError):
        baseframe.parse_address(bytearray(1))


def test_parse_address_too_short_input(baseframe):
    with pytest.raises(ValueError):
        baseframe.parse_address(bytes(2))
<commit_msg>tests for parse_address() stripped parameter added<commit_after>import sys
sys.path.append('../py-hdlc')
import pytest
from hdlc import HDLCBaseFrame


def test_plain_init():
    foo = HDLCBaseFrame()


def test_parse_address_string_input(baseframe):
    with pytest.raises(TypeError):
        baseframe.parse_address('test')


def test_parse_address_float_input(baseframe):
    with pytest.raises(TypeError):
        baseframe.parse_address(2.3)


def test_parse_address_bytearray_input(baseframe):
    with pytest.raises(TypeError):
        baseframe.parse_address(bytearray(1))


def test_parse_address_too_stripped_short_input(baseframe):
    with pytest.raises(ValueError):
        baseframe.parse_address(bytes(2))


def test_parse_address_too_stripped_short_input2(baseframe):
    """The stripped-flag is explicity set."""
    with pytest.raises(ValueError):
        baseframe.parse_address(bytes(2), stripped=True)


def test_parse_address_too_stripped_short_input2(baseframe):
    """The stripped-flag is explicity set."""
    with pytest.raises(ValueError):
        baseframe.parse_address(bytes(2), stripped=True)


def test_parse_address_too_unstripped_short_input(baseframe):
    """The stripped-flag is explicity set."""
    with pytest.raises(ValueError):
        baseframe.parse_address(bytes(4), stripped=False)


def test_parse_address_too_unstripped_short_input2(baseframe):
    """The stripped-flag is explicity set."""
    with pytest.raises(ValueError):
        baseframe.parse_address(b'\x7e\x00\x00\x7e', stripped=False)

{'fraction_non_alphanumeric': 0.1018018018018018, 'fraction_numerical': 0.009009009009009009, 'mean_word_length': 5.101648351648351, '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': '1038719', 'n_tokens_mistral': 737, 'n_tokens_neox': 736, 'n_words': 115}