<commit_before># -*- coding: utf-8 -*-
from __future__ import (
    division, absolute_import, print_function, unicode_literals,
)
from builtins import *                  # noqa
from future.builtins.disabled import *  # noqa

# import pytest
from magic_constraints import *  # noqa
from magic_constraints.parameter import *  # noqa
from magic_constraints.utils import *  # noqa


def test_repr():
    assert (
        repr_return("Parameter(name='a', type_=Sequence[int])") ==
        repr(Parameter(name='a', type_=Sequence[int]))
    )
    assert (
        repr_return(
            "Parameter("
            "name='a', "
            "type_=Sequence[int], "
            "nullable=True"
            ")"
        ) ==
        repr(Parameter(name='a', type_=Sequence[int], nullable=True))
    )
    # test keyword sorting.
    assert (
        repr_return(
            "Parameter("
            "name='a', "
            "type_=Sequence[int], "
            "default=[1, 2, 3], "
            "nullable=True"
            ")"
        ) ==
        repr(Parameter(
            name='a', type_=Sequence[int], nullable=True, default=[1, 2, 3],
        ))
    )
<commit_msg>Fixed testcases.<commit_after># -*- coding: utf-8 -*-
from __future__ import (
    division, absolute_import, print_function, unicode_literals,
)
from builtins import *                  # noqa
from future.builtins.disabled import *  # noqa

import pytest
from magic_constraints import *  # noqa
from magic_constraints.parameter import *  # noqa
from magic_constraints.utils import *  # noqa


pytestmark = pytest.mark.skipif(
    sys.version_info.major < 3,
    reason="future problem.",
)


def test_repr():
    assert (
        repr_return("Parameter(name='a', type_=Sequence[int])") ==
        repr(Parameter(name='a', type_=Sequence[int]))
    )
    assert (
        repr_return(
            "Parameter("
            "name='a', "
            "type_=Sequence[int], "
            "nullable=True"
            ")"
        ) ==
        repr(Parameter(name='a', type_=Sequence[int], nullable=True))
    )
    # test keyword sorting.
    assert (
        repr_return(
            "Parameter("
            "name='a', "
            "type_=Sequence[int], "
            "default=[1, 2, 3], "
            "nullable=True"
            ")"
        ) ==
        repr(Parameter(
            name='a', type_=Sequence[int], nullable=True, default=[1, 2, 3],
        ))
    )

{'fraction_non_alphanumeric': 0.13884297520661157, 'fraction_numerical': 0.006198347107438017, 'mean_word_length': 2.0491183879093198, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1745016', 'n_tokens_mistral': 759, 'n_tokens_neox': 748, 'n_words': 141}