<commit_before>from pyrsistent import v, m, s


def test_list_becomes_a_pvector():
    x = [1, 2]

    assert type(x) is type(v())
    assert x == v(1, 2)


def test_list_comprehension_becomes_a_pvector():
    x = [i for i in range(2)]

    assert type(x) is type(v())
    assert x == v(0, 1)


def test_dict_becomes_a_pmap():
    x = {'a': 1}

    assert type(x) is type(m())
    assert x == m(a=1)


def test_dict_comprehension_becomes_a_pmap():
    x = {k: v for k, v in [('a', 1)]}

    assert type(x) is type(m())
    assert x == m(a=1)


def test_set_becomes_a_pset():
    x = {'a'}

    assert type(x) is type(s())
    assert x == s('a')


def test_set_function_becomes_a_pset_when_no_argument():
    x = set()

    assert type(x) is type(s())
    assert x == s()


def test_set_function_becomes_a_set_when_arguments_are_present():
    x = set([])
    x.add(1)
<commit_msg>Some tests to verify that lists and dicts can be created<commit_after>from pyrsistent import v, m, s


def test_literal_list_becomes_a_pvector():
    x = [1, 2]

    assert type(x) is type(v())
    assert x == v(1, 2)


def test_function_list_becomes_a_list():
    x = list()

    assert type(x) is not type(v())


def test_list_comprehension_becomes_a_pvector():
    x = [i for i in range(2)]

    assert type(x) is type(v())
    assert x == v(0, 1)


def test_literal_dict_becomes_a_pmap():
    x = {'a': 1}

    assert type(x) is type(m())
    assert x == m(a=1)


def test_dict_comprehension_becomes_a_pmap():
    x = {k: v for k, v in [('a', 1)]}

    assert type(x) is type(m())
    assert x == m(a=1)


def test_function_dict_becomes_a_dict():
    x = dict()

    assert type(x) is not type(m())


def test_set_becomes_a_pset():
    x = {'a'}

    assert type(x) is type(s())
    assert x == s('a')


def test_set_function_becomes_a_pset_when_no_argument():
    x = set()

    assert type(x) is type(s())
    assert x == s()


def test_set_function_becomes_a_set_when_arguments_are_present():
    x = set([])
    x.add(1)

{'fraction_non_alphanumeric': 0.14634146341463414, 'fraction_numerical': 0.011946241911398706, 'mean_word_length': 3.3225806451612905, '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': '4513546', 'n_tokens_mistral': 852, 'n_tokens_neox': 805, 'n_words': 212}