<commit_before># -*- coding: utf-8 -*-

"""
:Copyright: 2007-2015 <NAME>
:License: MIT, see LICENSE for details.
"""

import pytest

from chatrelater.nicknames import clean_nickname


@pytest.mark.parametrize('input, expected', [
  ('@oper',   'oper'   ),
  ('%halfop', 'halfop' ),
  ('+voice',  'voice'  ),
  ('nothing', 'nothing'),
])
def test_clean_nickname(input, expected):
    assert clean_nickname(input) == expected
<commit_msg>Don't override the `input` built-in.<commit_after># -*- coding: utf-8 -*-

"""
:Copyright: 2007-2015 <NAME>
:License: MIT, see LICENSE for details.
"""

import pytest

from chatrelater.nicknames import clean_nickname


@pytest.mark.parametrize('dirty_nickname, expected', [
  ('@oper',   'oper'   ),
  ('%halfop', 'halfop' ),
  ('+voice',  'voice'  ),
  ('nothing', 'nothing'),
])
def test_clean_nickname(dirty_nickname, expected):
    assert clean_nickname(dirty_nickname) == expected

{'fraction_non_alphanumeric': 0.18329718004338394, 'fraction_numerical': 0.019522776572668113, 'mean_word_length': 4.732919254658385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '791871', 'n_tokens_mistral': 342, 'n_tokens_neox': 324, 'n_words': 72}